Dear All, Here is a reprex: set.seed(123) b <- arima.sim(list(order = c(1,0,0),ar= .9),n=1000,sd=1) arima(b) Call: arima(x = b) Coefficients: intercept 0.2250 s.e. 0.0688 sigma^2 estimated as 4.735: log likelihood = -2196.4, aic = 4396.81>Should sigma^2 not be equal to 1 ? Where do I misunderstand ? Many thanks, Ashim [[alternative HTML version deleted]]
Try google'ing for 'variance of an AR(1) process'. With the same seed, if you set n=1000000, you will get something that will compare well with what you discover from your search. On Tue, Nov 13, 2018 at 2:04 PM Ashim Kapoor <ashimkapoor at gmail.com> wrote:> Dear All, > > Here is a reprex: > > set.seed(123) > b <- arima.sim(list(order = c(1,0,0),ar= .9),n=1000,sd=1) > arima(b) > > Call: > arima(x = b) > > Coefficients: > intercept > 0.2250 > s.e. 0.0688 > > sigma^2 estimated as 4.735: log likelihood = -2196.4, aic = 4396.81 > > > > Should sigma^2 not be equal to 1 ? Where do I misunderstand ? > > Many thanks, > Ashim > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Try supplying the order argument to arima. It looks like the default is to estimate only the mean.> arima(b, order=c(1,0,0))Call: arima(x = b, order = c(1, 0, 0)) Coefficients: ar1 intercept 0.8871 0.2369 s.e. 0.0145 0.2783 sigma^2 estimated as 1.002: log likelihood = -1420.82, aic = 2847.63 Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Nov 13, 2018 at 4:02 AM, Ashim Kapoor <ashimkapoor at gmail.com> wrote:> Dear All, > > Here is a reprex: > > set.seed(123) > b <- arima.sim(list(order = c(1,0,0),ar= .9),n=1000,sd=1) > arima(b) > > Call: > arima(x = b) > > Coefficients: > intercept > 0.2250 > s.e. 0.0688 > > sigma^2 estimated as 4.735: log likelihood = -2196.4, aic = 4396.81 > > > > Should sigma^2 not be equal to 1 ? Where do I misunderstand ? > > Many thanks, > Ashim > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/ > posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Dear Eric and William, Why do the 1st and 2nd incantation of arima return sigma^2 as 5.233 vs .9999? The help for arima says ---> sigma2: the MLE of the innovations variance. By that account the 1st result is incorrect. I am a little confused. set.seed(123) b <- arima.sim(list(order = c(1,0,0),ar= .9),n=1000000,sd=1) # Variance of the innovations, e_t = 1 # Variance of b = Var(e_t)/(1-Phi^2) = 1 / (1-.81) = 5.263158 arima(b)> arima(b)Call: arima(x = b) Coefficients: intercept -0.0051 s.e. 0.0023 sigma^2 estimated as 5.233: log likelihood = -2246450, aic = 4492903>arima(b,order= c(1,0,0)) Call: arima(x = b, order = c(1, 0, 0)) Coefficients: ar1 intercept 0.8994 -0.0051 s.e. 0.0004 0.0099 sigma^2 estimated as 0.9999: log likelihood = -1418870, aic = 2837747>On Tue, Nov 13, 2018 at 11:07 PM William Dunlap <wdunlap at tibco.com> wrote:> Try supplying the order argument to arima. It looks like the default is > to estimate only the mean. > > > arima(b, order=c(1,0,0)) > > Call: > arima(x = b, order = c(1, 0, 0)) > > Coefficients: > ar1 intercept > 0.8871 0.2369 > s.e. 0.0145 0.2783 > > sigma^2 estimated as 1.002: log likelihood = -1420.82, aic = 2847.63 > > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Tue, Nov 13, 2018 at 4:02 AM, Ashim Kapoor <ashimkapoor at gmail.com> > wrote: > >> Dear All, >> >> Here is a reprex: >> >> set.seed(123) >> b <- arima.sim(list(order = c(1,0,0),ar= .9),n=1000,sd=1) >> arima(b) >> >> Call: >> arima(x = b) >> >> Coefficients: >> intercept >> 0.2250 >> s.e. 0.0688 >> >> sigma^2 estimated as 4.735: log likelihood = -2196.4, aic = 4396.81 >> > >> >> Should sigma^2 not be equal to 1 ? Where do I misunderstand ? >> >> Many thanks, >> Ashim >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > >[[alternative HTML version deleted]]