Displaying 20 results from an estimated 1000 matches similar to: "lme, corARMA and large data sets"
2005 Dec 09
1
R-help: gls with correlation=corARMA
Dear Madams/Sirs,
Hello. I am using the gls function to specify an arma correlation during
estimation in my model. The parameter values which I am sending the
corARMA function are from a previous fit using arima. I have had some
success with the method, however in other cases I get the following error
from gls: "All parameters must be less than 1 in absolute value". None
of
2004 Jul 30
1
lme: problems with corARMA
Trying following example from Pinheiro and Bates in order to fit an
ARMA(1,1) model:
library(nlme)
fm1Ovary.lme<-lme(follicles~sin(2*pi*Time)+cos(*pi*Time),data=Ovary,random=p
dDiag(~sin(2*pi*Time)))
fm5Ovary.lme<-update(fm1Ovary.lme,corr=corARMA(p=1,q=1))
I get follwing error message:
Error in "coef<-.corARMA"(`*tmp*`, value = c(62.3428455941166,
62.3428517930051 :
2005 Jun 10
1
Problems with corARMA
Dear all
I am tryiing to fit the following lme with an ARMA correlation structure:
test <- lme(fixed=fev1f~year, random=~1|id2, data=pheno2,
correlation=corARMA(value=0.2, form=~year|id2), na.action=na.omit)
But I get the following error message:
Error in getGroupsFormula.default(correlation, asList = TRUE) :
"Form" argument must be a formula
I have used this same form
2003 Jul 08
1
Questions about corARMA
Hi,
I'm a new member here in the list. I am a graduate from University of Georgia. Recently in doing analysis using lme on a dataset, I found several questions:
1. How to express the equation when the correlation structure is very complicated. For exmaple, if the fixed is y(t)=0.03x1(t)+1.5x2(t)(I omitted "hat" and others). And the model with corARMA(p=2,q=3) is proper. What will be
2006 Dec 06
1
Questions about regression with time-series
Hi,
I am using 2 times series and I want to carry out a regression of Seri1
by Serie2 using structured (autocorrelated) errors.
(Equivalent to the autoreg function in SAS)
I found the function gls (package nlme) and I made:
gls_mens<-gls(mening_s_des~dataATB, correlation = corAR1())
My problem is that I don’t want a AR(1) structure but ARMA(n,p) but the
execution fails :
2007 Oct 10
2
corMatrix crashes with corARMA structure (PR#9952)
Full_Name: Benjamin Tyner
Version: 2.6.0 RC 2007-10-01 r43043
OS: WinXP
Submission from: (NULL) (171.161.224.10)
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status RC
major
2008 Feb 12
0
nlme & special case of corARMA?
Dear All:
I am trying to fit a special case of a 2-banded Toeplitz correlation
structure. A 2-banded Toeplitz has ones on the diagonal, a
correlation, RHO1, on the first off-diagonal, and a correlation, RHO2,
on the second off-diagonal, with zeros on all subsequent
off-diagonals. After reading relevant sections in Mixed-Effects
Models in S and S-PLUS (Pinheiro & Bates, 2000) and searching
2007 Oct 01
1
corMatrix crashes R 2.5.1 (windows XP) with corARMA structure
R-helpers,
n <- 100
arcoefs <- c(0.8)
macoefs <- c(-0.6)
p <- length(arcoefs)
q <- length(macoefs)
require(nlme)
tmp <- corARMA(value=c(arcoefs,macoefs), form=~1, p=p, q=q)
Sigma <- corMatrix(tmp, covariate = 1:n) # results in segfault
Have I used these commands in an improper way?
Thanks
Ben
2012 Feb 17
2
Error message in gamm. Problem with temporal correlation structure
HELLO ALL,
I AM GETTING AN ERROR MESSAGE WHEN TRYING TO RUN A GAMM MODEL LIKE THE ONE BELOW.
I AM USING R VERSION 2.14.1 (2011-12-22) AND MGCV 1.7-12.
M1 <-gamm(DepVar ~ Treatment + s(Year, by =Treatment), random=list(Block=~1), na.action=na.omit, data = mydata, correlation = corARMA(form =~ Year|Treatment, p = 1, q = 0))
THIS IS THE ERROR MESSAGE
Error in `*tmp*`[[k]] : attempt to
2004 Mar 09
2
corARMA and ACF in nlme
Hi R-sters,
Just wondering what I might be doing wrong. I'm trying to fit a multiple
linear regression model, and being ever mindful about the possibilities of
autocorrelation in the errors (it's a time series), the errors appear to
follow an AR1 process (ar(ts(glsfit$residuals)) selected order 1). So,
when I go back and try to do the simultaneous regression and error fit with
gls,
2004 Apr 22
1
lme correlation structure error
Hi there fellow R-users,
I am trying to follow an example of modelling a serial correlation structure
in the textbook "Mixed Effects Model in S and Splus".
However, I am getting some very odd results. Here is what I am trying to
run:
library(nlme)
data(Ovary)
fm1<-lme(follicles~sin(2*pi*Time)+cos(2*pi*Time),data=Ovary,random=pdDiag(~s
in(2*pi*Time)))
### The example is fine up
2003 Jul 21
0
correlated residuals in gls: Coefficient matrix not invertible
Dear Rers,
I have threes series, x, y, z and I want to fit a model z ~ x + y. First of
all, I fit a lm. I found the residuals are correlated, by looking at the
acf() and pacf(). Then I tried to fit a gls model allowing residuals to be
correlated (correlation = corARMA(p=5, q=1)):
y.na <- as.data.frame(y[complete.cases(y),])
y.gls <- gls(z ~ x + y, data = y.na, correlation=corARMA(p=5,
2003 Jul 09
0
model selection in lme when corARMA is assumed
I have a data analysis job for which lme may be used. Prof. Spencer Graves had helped me much on that. I'm really appreciated for that. Could anybody else in the list give me some hints from other perspectives? I hope I can learn as much as possible for this complicated real data.
Thanks in advance.
Hanhan
To briefly describe my data: My data is health effect measurements (y) and personal
2012 Apr 19
2
Gls function in rms package
Dear R-help,
I don't understand why Gls gives me an error when trying to fit a
model with AR(2) errors, while gls (from nlme) does not. For example:
library(nlme)
library(rms)
set.seed(1)
d <- data.frame(x = rnorm(50), y = rnorm(50))
gls(y ~ x, data=d, correlation = corARMA(p=2)) #This works
Gls(y ~ x, data=d, correlation = corARMA(p=2)) # Gives error
# Error in
2006 Nov 06
1
question about function "gls" in library "nlme"
Hi:
The gls function I used in my code is the following
fm<-gls(y~x,correlation=corARMA(p=2) )
My question is how to extact the AR(2) parameters from "fm".
The object "fm" is the following. How can I extract the correlation parameters
Phi1 and Phi2 from "fm"? These two parametrs is not in the "coef" componenet of "fm".
Thanks a
2011 Mar 29
1
lme:correlationstructure AR1 and random factor
Dear helpers,
I tried these models to run in the package nlme, but allways got the same
error message...
I have a correlation in 5 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 <-
2011 Feb 22
1
Adjusting for autocorrelation in a panel model
I am working with panel data. I am using the plm package to do this.
I would like to do be able to adjust for autocorrelation, as one does with
glm models and correlation structures (eg corr=corARMA(q=4)) . In
particular, I want to employ MA(4) error structure.
Is there a way of doing this with the plm package?
(Note: I do not really want to use the pggls function for various
2006 Jan 05
1
Problem with nlme version 3.1-68
Dear All:
I updated my R program as well as associated packages yesterday. Currently
my R version is 2.2.1 running under WINXP SP-2.
When I tried to list (summary) an nlme object that I developed before, I got
the following error message:
[ Error in .C("ARMA_constCoef", as.integer(attr(object, "p")),
as.integer(attr(object, :
C entry point "ARMA_constCoef"
2008 May 02
1
Errors using nlme's gls with autocorrelation
Hi,
I am trying out a generalized least squares method of forecasting that
corrects for autocorrelation. I downloaded daily stock data from Yahoo
Finance, and am trying to predict Close (n=7903). I have learned to use
date functions to extract indicator variables for Monday - Friday (and
Friday is missing in the model to prevent it from becoming full rank). When
I run the following code...
2008 Oct 16
0
R package: autocorrelation in gamm
Dear users
I am fitting a Generalized Additive Mixed Models (gamm) model to
establish possible relationship between explanatory variables (water
temperature, dissolved oxygen and chlorophyll) and zooplankton data
collected in the inner and outer estuarine waters. I am using monthly
time-series which are auto-correlated.
In the case of the inner waters, I have applied satisfactoryly (by