search for: ar1

Displaying 20 results from an estimated 179 matches for "ar1".

Did you mean: a1
2007 Jul 16
1
question about ar1 time series
Hello everybody, I recently wrote a "program" that to generate AR1 time series, here the code: #By Jomopo. Junio-2007, Leioa, Vizcaya #This program to create the AR1 syntetic series (one by one) #Where the mean is zero, but the variance of the serie AR1 and #the coef. of AR1 are be changed. If var serie AR1 = 1 then is standarized! #Final version for AR1 time se...
2007 Jan 30
5
how to join two arrays using their column names intersection
Dear all, I have a problem that may be someone of you can help. I am a newbie and do not find how to do it in manuals. I have two arrays, for example: ar1 <- array(data=c(1:16),dim=c(4,4)) ar2 <- array(data=c(1:16),dim=c(4,4)) colnames(ar1)<-c("A","B","D","E") colnames(ar2)<-c("C","A","E","B") > ar1 A B D E [1,] 1 5 9 13 [2,] 2 6 10 14 [3,] 3 7 11...
2001 Sep 26
1
Table help
Hi, A quick question: I have to vectors, say ar1 and ar2 > ar1 [1] "a" "c" "c" "a" attr(,"levels") [1] "a" "b" "c" > ar2 [1] TRUE TRUE FALSE TRUE > table(ar1, ar2) ar2 ar1 FALSE TRUE a 0 2 c 1 1 I would like to...
2008 Nov 04
2
ggplot & annotating charts
....csv", header=T,sep=",", na.strings="") names(vix) <- tolower(names(vix)) vix$dates <- chron(as.character(vix$date),out.format="d-mon-y") vix.z <- zoo(vix[,-1],vix$dates) vix.close1<-aggregate(vix.z[,4],as.yearmon,max) # 1990 - 2003 vix.ar1 <- read.csv("C:/Data/MindShare/Recession/vixarchive.csv", header=T,sep=",", quote="",na.strings="n/a") names(vix.ar1) <- tolower(names(vix.ar1)) vix.ar1$dates <- chron(as.character(vix.ar1$date),out.format="d-mon-y") vix.ar1.z &l...
2010 Nov 22
2
Help: Standard errors arima
Hello, I'm an R newbie. I've tried to search, but my search skills don't seem up to finding what I need. (Maybe I don't know the correct terms?) I need the standard errors and not the confidence intervals from an ARIMA fit. I can get fits: > coef(test) ar1 ma1 intercept time(TempVector) - 1900 0.801459585 0.704126549 12.854527065 0.000520366 And confidence intervals: > confint(test) 2.5 % 97.5 % ar1 7.6...
2010 Apr 29
1
Generalized Estimating Equation (GEE): Why is Link = Identity?
Hi, I'm running GEE using geepack. I set corstr = "ar1" as below: > m.ar <- geeglm(L ~ O + A, + data = firstgrouptxt, id = id, + family = binomial, corstr = "ar1") > summary(m.ar) Call: geeglm(formula = L ~ O + A, family = binomial, data = firstgrouptxt, id = id, corstr = "ar1"...
2011 Oct 08
0
Accouting for temporal correlation in linear regression
...ar model with uncorrelated residuals using gls: M.lm <- gls (PP ~ nitrate, data=data) I then looked for evidence of auto-correlation using acf: acf (residuals ( M.lm, type = 'normalized')) The plot showed a clear pattern, so I reran the gls using an AR-1 auto-correlation structure: M.AR1 <- gls (PP ~ nitrate, correlation = corAR1 (form =~Rdate), data=data) I then compared the AIC values of the M.lm and M.AR1: AIC(M.lm, M.AR1) M.AR1 had a much lower AIC score than M.lm, suggesting that it is the better model. I then inspected a plot of the standardized residuals against t...
2009 Feb 03
3
Problem about SARMA model forcasting
...ge". And the order is (1,1)*(0,1)45 The regular AR=1; regular MA=1; seasonal AR=0; seasonal MA=1; seasonal period=45. I fitted the model in R and get the result as below: Call:arima(x = cDownRange, order = c(1, 0, 1), seasonal = list(order = c(0, 1, 1), period = 45)) Coefficients: ar1 ma1 sma1 0.7364 -0.5046 -0.9511 s.e. 0.0458 0.0594 0.0130 When I use the predict command of this model in R, it gives the right forcasting. So I think the forcast formula of this SARMA model should be written as below: X(t)=ar1*X(t-1)-ma1*a(t-1)-sma1*a(t-45)+ma1*sma1*a(...
2011 Mar 12
0
Repeated measures in nlme vs SAS Proc Mixed with AR1 correlation structure
...72,0.87,0.02) Subject<-c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10) Day<-c(1,2,4,6,1,2,4,6,1,2,4,6,1,2,4,6,1,2,4,6,1,2,4,6,1,2,4,6,1,2,4,6,1,2,4,6,1,2,4,6) sasdata<-data.frame(cbind(Response, Subject, Day)) sasdata$Time<-as.factor(sasdata$Day) AR1<-lme(Response~Time, random=~1|Subject, correlation=corAR1(form=~as.numeric(Time)|Subject, fixed =FALSE), data=sasdata, na.action = (na.omit), method = "REML") AR1 SAS Code: proc mixed; class Subject Day; model Response = Day / outp=pout; repeated Day / subject = Subject type=AR(1);...
2004 Jan 21
0
intervals in lme() and ill-defined models
...0.56539 1 vs 2 0 1 HOWEVER, for the example in chapter 5.3 of the book in which an autoregressive structure is used for the within group errors, I get the following error: > test <- lme(follicles~sin(2*pi*Time)+cos(2*pi*Time),data=Ovary,random=pdDiag(~sin(2* pi*Time))) > test.ar1 <- lme(follicles~sin(2*pi*Time)+cos(2*pi*Time),data=Ovary,random=pdDiag(~sin(2* pi*Time)),correlation=corAR1()) > intervals(test.ar1) Error in intervals.lme(test.ar1) : Cannot get confidence intervals on var-cov components: Non-positive definite approximate variance-covariance BUT, anova app...
2006 Mar 10
0
Strange problem with STATUS of Intel MatrixRAID
Hello I have this problem: Yesterday server with FreeBSD 6.0 was self restarted . In messages was this: Mar 8 20:03:11 mail kernel: ar1: WARNING - mirror protection lost. RAID1 array in DEGRADED mode Mar 8 20:03:11 mail kernel: ar1: writing of Intel MatrixRAID metadata is NOT supported yet Mar 8 20:03:11 mail kernel: subdisk8: detached Mar 8 20:03:11 mail kernel: ar1: writing of Intel MatrixRAID metadata is NOT supported yet...
2009 Oct 07
0
error using predict() / "fRegression"-package
...31 0.00686 ... $ lag(ret3) : num NA 0.0278 0.0152 0.0211 -0.0104 ... $ (lag(ret1)*lag(ret2)): num NA 2.13e-04 0.00 4.43e-05 1.15e-04 ... $ (lag(ret1)*lag(ret3)): num NA 4.32e-04 2.21e-04 7.03e-05 -1.75e-04 ... $ (lag(ret2)*lag(ret3)): num NA 3.82e-04 0.00 2.81e-04 -7.16e-05 ... > ar1.xpred.fitted <- regFit(ar1.xpred.model, data = regdata, use = "lm") > ar1.xpred.train.pred <- predict(ar1.xpred.fitted, regdata, se.fit = FALSE) > ar1.xpred.test.pred <- predict(ar1.xpred.fitted, regdata.test, se.fit = FALSE) Fehler: variable 'lag(ret1)' was fit...
2009 Nov 02
2
using exists with coef from an arima fit
Dear R People: I have the output from an arima model fit in an object xxx. I want to verify that the ma1 coefficient is there, so I did the following: > xxx$coef ar1 ar2 ma1 intercept 1.3841297 -0.4985667 -0.9999996 -0.1091657 > str(xxx$coef) Named num [1:4] 1.384 -0.499 -1 -0.109 - attr(*, "names")= chr [1:4] "ar1" "ar2" "ma1" "intercept" > exists('xxx$coef["ma1"]') [1]...
2010 May 02
0
how to plot forecast together with historical series in OLS or special ARIMA model
...de the additional variable in my model to check if it helps to predict the outcome: First I built the OLS model with the same lagged variable (HCPI, look the series below): ar<- lm(diff(HCPIlong)[2:16]~diff(HCPIlong)[1:15]-1) ar.predict<-predict(ar, n.ahead=5) and then the same + Wages: ar1<-lm(diff(HCPIlong)[2:16]~diff(HCPIlong)[1:15]+diff(wageslong)[1:15]-1) ar1.predict<-predict(ar1, n.ahead=5) ts.plot(HCPIlong,ar1.predict$pred,lty=1:2) (or: ar2<-lm(diff(HCPIlong)[2:16]~diff(wageslong)[1:15]-1) ar2.predict<-predict(ar2, n.ahead=5)) but when I try to plot it with...
2011 Mar 29
1
lme:correlationstructure AR1 and random factor
...sessions within a field (n=12) with ten traps in one field. res2a <- lme(response~x+y+z+treatment),correlation = corARMA(form = ~ session|trapfield, p = 1, q = 0), random=~1|field, na.action=na.omit, data=plates, method="ML") res2a <- lme(response~x+y+z+treatment,correlation = corCAR1(form = ~ session|trapfield), random=~1|field, na.action=na.omit, data=plates, method="ML") Error: Incompatible formulas for groups in "random" and "correlation" What is the problem? thanks a lot! Yvonne -- View this message in context: http://r.789695.n4.nabble.com...
2010 Jul 15
1
I can't figure out my plm model. Any ideas?
Dear R users, I am using plm packege in R to build my model, but from the result I can't quite figure out what it is... Can anyone tell me why? Am I missing something? R Results: *> ar1<-plm(formula=ADOP~lag(ADOP,1)+PE+WOR, + data=well, effect="time",model="within") > summary(ar1)* Oneway (time) effect Within Model Call: plm(formula = ADOP ~ lag(ADOP, 1) + PE + WOR, data = well, effect = "time", model = "within") Unbalanced Pane...
2010 Jun 08
1
GEE: estimate of predictor with high time dependency
Hi, I'm analyzing my data using GEE, which looks like below: > interact <- geeglm(L ~ O + A + O:A, + data = data1, id = id, + family = binomial, corstr = "ar1") > summary(interact) Call: geeglm(formula = lateral ~ ontask + attachment + ontask:attachment, family = binomial, data = firstgroupnowalking, id = id, corstr = "ar1") Coefficients: Estimate Std.err Wald Pr(>|W|) (Intercept) -1.89133 0.30363...
2004 May 02
1
arima problems when using argument fixed=
...> init1 <- c(0, coef(mod1)[2]) > fixed1 <- c(as.numeric(NA), 0) > > arima(x, order=c(1,0,0), xreg=t, include.mean=FALSE, init=init1, fixed=fixed1) Call: arima(x = x, order = c(1, 0, 0), xreg = t, include.mean = FALSE, fixed = fixed1, init = init1) Coefficients: ar1 t 0.9281 0 s.e. 0.0357 0 sigma^2 estimated as 0.9186: log likelihood = -138.64, aic = 281.28 > > init2 <- init1 > init2[2] <- 0 > > fixed2 <- init1 > fixed2[1] <- as.numeric(NA) > > arima(x, order=c(1,0,0), xreg=t, include.mean=FALSE, init=init2,...
2013 Mar 15
1
multiple frequencies per second again
...: > xx <- ts(rnorm(128),start=0,freq=128) > str(xx) Time-Series [1:128] from 0 to 0.992: -1.07 0.498 1.508 0.354 -0.497 ... > xx.ar <- arima(xx,order=c(1,0,0)) > str(xx.ar) List of 13 $ coef : Named num [1:2] -0.0818 0.0662 ..- attr(*, "names")= chr [1:2] "ar1" "intercept" $ sigma2 : num 1.06 $ var.coef : num [1:2, 1:2] 7.78e-03 -5.09e-05 -5.09e-05 7.07e-03 ..- attr(*, "dimnames")=List of 2 .. ..$ : chr [1:2] "ar1" "intercept" .. ..$ : chr [1:2] "ar1" "intercept" $ mask : log...
2005 Apr 15
1
AR1 in gls function
Dear R-project users I would like to calculate a linear trend versus time taking into account a first order autoregressive process of a single time series (e.g. data$S80 in the following example) using th gls function. gls(S80 ~ tt,data=data,corAR1(value, form, fixed)) My question is what number to set in the position of value within corAR1? Should it be the acf at lag 1? I look forward for your reply With kind regards Prodromos Zanis -- **************************************************** Dr. Prodromos Zanis Centre for Atmospheric P...