Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Need help on interpreting the acf plot(sin graph pattern)
May be you will need to examine the PACF, you have a large peak in the first lag, followed by a decreasing wave that alternates between positive and negative correlations. Which can mean an autoregressive term of higher order in the data.
Use the partial autocorrelation function to determine the order of the autoregressive term.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
How can I constrain my regression coefficient (only the slope, not the intercept) to be positive? It's a general statistical question, but specifically, I would like to have an r solution, and even more specifically when using model 2 regression (major axis regression).
You could do linear regression with nls, and limit the paramater range there.
Example: Using the nl2sol algorithm from the Port library we want to find a data set with x and y values with a negative Y-intercept and slope between 1.5 and 1.6:
nls(y~a+b*x,algorithm="port",start=c(a=0,b=1.5),lower=c(a=-Inf,b=1.4),upper=c(a=Inf,b=1.6))
This solution and others are explained in the more general question at https://stats.stackexchange.com/questions/61733/linear-regression-with-slope-constraint
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
For the auto.arima function in forecast package of R, is there a way to let the function omit a model of arima(0,0,0), as I simply assume there must be some correlation within the dataset.
You could try looking at the help for the function
auto.arima(). Check the arguments start.p, start.q,
d,max.d
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a set of data, after questioning customers.(it's about a shoe company) Two of the columns include GENDER and INCOME. I am supposed to test if there are any significant differences in income between genders, and give the corresponding P-value.
I'm still a n00b when it comes to R, I'm still learning and I've been struggling for 3 days now to find the functions to do so. Does anyone have any lead, or could help me with it? would be awesome.
I am editing this because I realized my other answer was not correct.
What you want is a linear model.
say
GENDER <- factor(c(0,1,1,0,1)
INCOME <- c(20000,30000,40000,50000,550000)
then you want
model <-lm(INCOME~GENDER)
and
summary(model)
anova(model)
will give you the information you are after.
Good luck,
Bryan
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
How to generate random data (synthetic data) from a generalized gamma distribution with three parameters (scale, shape and shape)?. Using Matlab or R.
https://en.wikipedia.org/wiki/Generalized_gamma_distribution
Have a look at the VGAM::gengamma function.
See http://www.inside-r.org/packages/cran/vgam/docs/gengamma
Or flexsurv::GenGamma
see http://artax.karlin.mff.cuni.cz/r-help/library/flexsurv/html/GenGamma.html
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
i want to fit a tweedie compound Poisson Gamma to my loss data using ptweedie.series R command. I am getting problems how to start with my fitting in R. Thanks in advance.
Performing such a fit is illustrated here:
library(tweedie)
example("tweedie-package")