similar to: correlation range estimates with nlme::gls

Displaying 20 results from an estimated 5000 matches similar to: "correlation range estimates with nlme::gls"

2005 May 17
0
problem with gls : combining weights and correlation structure
Dear R-users, I hope you will have time to read me and I will try to be brief. I am also sorry for my poor english. I used gls function from the package nlme to correct two types of bias in my database. At first, because my replicates are spatially aggregated, I would like to fit a corStruct function like corLin, corSpher, corRatio, corExp or corGaus in my gls model, and simultaneously,
2011 Jun 20
0
R crashes with 'nlme' and corStruct
Hello, I would like to fit correlation structures with nlme, but R crashes. My data is similar to the "growth of orange trees" example from Pinheiro and Bates (2000), but data are not equally spaced in time, as the last observation is taken after 6 days ( and not 2 as the others). This is the code I'm using: library(nlme)
2006 Jul 01
1
nlme: correlation structure in gls and zero distance
Dear listers, I am trying to model the distribution of fox density over years in the Doubs department. Measurements have been taken on 470 plots in March each year and georeferenced. Average density is supposed to be different each year. In a first approach, I would like to use a general model of this type, taking spatial correlation into account:
2009 Sep 01
1
understanding the output from gls
I'd like to compare two models which were fitted using gls, however I'm having trouble interpreting the results of gls. If any of you could offer me some advice, I'd greatly appreciate it. Short explanation of models: These two models have the same fixed-effects structure (two independent, linear effects), and differ only in that the second model includes a corExp structure for
2013 Apr 13
1
how to add a row vector in a dataframe
Hi, Using S=1000 and simdata <- replicate(S, generate(3000)) #If you want both "m1" and "m0" #here the missing values are 0 res1<-sapply(seq_len(ncol(simdata.psm1)),function(i) {x1<-merge(simdata.psm0[,i],simdata.psm1[,i],all=TRUE); x1[is.na(x1)]<-0; x1}) res1[,997:1000] #????? [,1]???????? [,2]???????? [,3]???????? [,4]??????? #x1??? Numeric,3000 Numeric,3000
2008 Feb 25
0
logLik calculation in gls (nlme)
I'm getting some odd results computing log-likelihoods with gls using splines with increasing degrees of freedom -- the deviance *increases* substantially with increasing df. (Since spline models with increasing df aren't nested, it need not decline monotonically but I would expect it to have a decreasing trend!) I may just be confused, but I *think* the issue is somewhere within the
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...
2003 Nov 21
0
gls with serial correlation
Hello there fellow R users, Im trying to fit a gls model to data which has serial correlation in the errors e(t)=p*e(t-1). However I dont seem to be having much luck in erradicating the autocorrelation in the residuals. I have created the following example. library(nlme) x<-rnorm(100) y<-3+2*x y<-y+arima.sim(100,model=list(ar=(0.6)))+rnorm(100,0,0.2) #Create a data set with first
2009 Aug 24
1
lme, lmer, gls, and spatial autocorrelation
Hello folks, I have some data where spatial autocorrelation seems to be a serious problem, and I'm unclear on how to deal with it in R. I've tried to do my homework - read through 'The R Book,' use the online help in R, search the internet, etc. - and I still have some unanswered questions. I'd greatly appreciate any help you could offer. The super-super short explanation is
2009 Jan 28
1
gls prediction using the correlation structure in nlme
How does one coerce predict.gls to incorporate the fitted correlation structure from the gls object into predictions? In the example below the AR(1) process with phi=0.545 is not used with predict.gls. Is there another function that does this? I'm going to want to fit a few dozen models varying in order from AR(1) to AR(3) and would like to look at the fits with the correlation structure
2012 May 25
1
Problem with Autocorrelation and GLS Regression
Hi, I have a problem with a regression I try to run. I did an estimation of the market model with daily data. You can see to output below: /> summary(regression_resn) Time series regression with "ts" data: Start = -150, End = -26 Call: dynlm(formula = ror_resn ~ ror_spi_resn) Residuals: Min 1Q Median 3Q Max -0.0255690 -0.0030378 0.0002787
2006 Mar 13
1
P-values in gls
When fitting a simple linear or polynomial regression using lm, R provides a p-value for the whole model as well as for the individual coefficients. When fitting the same models using gls (in order to correct for autocorrelation), there doesn't seem to be a p-value provided for the whole model, although LL, AIC and BIC statistics are provided. Is it possible to obtain a p-value for the whole
2005 Apr 15
1
Residuals in gls
Dear R-helpers, I am doing a multiple linear regression of an ozone time-series on time and other explanatory variables. I have been using the "lm" model but I am recently experimenting with "gls". With the "lm" model I was able to look at the residuals by $res in the "summary (lm(...))" and then check with "acf" for autocorrelation in these
2007 Mar 13
0
segfault with correlation structures in nlme
Hi out there, I am trying to fit a species accumulation curve (increase in number of species known vs. sampling effort) for multiple regions and several bootstrap samples. The bootstrap samples represent different arrangements of the actual sample sequence. I fitted a series of nlme-models and everything seems OK, but since the observations are correlated I tried to include some correlation
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,
2006 Jul 13
1
Extracting Phi from gls/lme
I am trying to extract into a scalar the value of Phi from the printed output of gls or lme using corAR1 correlation. ie I want the estimate of the autocorrelation. I can't see how to do this and haven't seen it anywhere in str(model.lme). I can get all the other information - fixed and random effects etc. Is there an obvious way so that I can save the brick wall some damage? TIA
2003 Oct 31
0
strange logLik results in gls (nlme)
I am trying to analyse a data with gls/lm using the following set of models prcn.0.lm <- lm( log10(Y)~(cond-1)+(cond-1):t ,prcn) prcn.1.gls <- gls( log10(Y)~(cond-1)+(cond-1):t ,prcn,cor=corAR1()) prcn.0.gls <- gls( log10(Y)~(cond-1)+(cond-1):t ,prcn) prcn.1m.gls <- gls( log10(Y)~(cond-1)+(cond-1):t ,prcn,cor=corAR1(),method="ML") I get the following AICs for these models:
2011 Dec 12
0
Confidence intervals of gls function?
Dear gls-experts, while reading and testing some examples of the book "introductionary time series analysis with R", I encountered the following fact which puzzles me. Confidence intervals for global temperature time series (P99) computed from general least squares (GLS) to fit the time series. I repeat the example from the book and get the same results: temp.gls=gls(temp ~
2009 Mar 04
0
'anova.gls' in 'nlme' (PR#13567)
There is a bug in 'anova.gls' in the 'nlme' package (3.1-90). The=20 bug is triggered by calling the function with a single 'gls' object=20 and specifying the 'Terms' argument but not the 'L' argument: > library(nlme) > fm1Orth.gls <- gls(distance ~ Sex * I(age - 11), Orthodont, + correlation =3D corSymm(form =3D ~ 1 |
2003 Sep 25
1
Error from gls call (package nlme)
Hi I have a huge array with series of data. For each cell in the array I fit a linear model, either using lm() or gls() with lm() there is no problem, but with gls() I get an error: Error in glsEstimate(glsSt, control = glsEstControl) : computed gls fit is singular, rank 2 as soon as there are data like this: > y1 <- c(0,0,0,0) > x1 <- c(0,1,1.3,0) > gls(y1~x1)