similar to: correlated residuals in gls: Coefficient matrix not invertible

Displaying 20 results from an estimated 1000 matches similar to: "correlated residuals in gls: Coefficient matrix not invertible"

2007 Jul 07
0
Error Coefficient matrix not invertible using nlme correlation
Hi, I am learning R. I am using nlme function to my dataset. I am getting error "Coefficient matrix not invertible". I don't know how to fix this problem. > bcows1.nlme<-nlme(Temp~model(newTime, beta, delta, kappa), data= bcows.group, + fixed=beta+delta+kappa~1, + random=beta+delta+kappa~1, + start=list(fixed=c(coef(bcows.nls)[1],
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
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
2011 May 30
0
gls and phi1 >1 (phi larger than one)
Dear all, I am stuck with a problem that might be trivial for most of you (and therefore is a bit embarrassing for me...): I want to calculate a generalized least squares regression using two time series (Y depending on X) with an autoregressive correlation structure of order two (the data along time are given below). I use 'gls' from package 'nlme': Calib.gls <- gls(Y~X,
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...
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 :
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
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
2006 Aug 09
1
Joint confidence intervals for GLS models?
Dear All, I would like to be able to estimate confidence intervals for a linear combination of coefficients for a GLS model. I am familiar with John Foxton's helpful paper on Time Series Regression and Generalised Least Squares (GLS) and have learnt a bit about the gls function. I have downloaded the gmodels package so I can use the estimable function. The estimable function is very
2011 Nov 22
0
Error in gls function in loop structure
Hi, r-users I got a problem when I try to call a *gls* function in loop structure. The gls function seems not able to recognize the parameters that I pass into the loop function! (But, if I use lm function, it works.) The code looks like this: ================================================= gls.lm <- function(Data, iv1, dv1) { gls.model <- gls(Data[ , dv1] ~ Data[ , iv1], correlation =
2009 Apr 23
0
How to construct confidence bands from a gls fit?
Dear R-list, I would like to show the implications of estimating a linear trend to time series, which contain significant serial correlation. I want to demonstrate this, comparing lm() and an gls() fits, using the LakeHuron data set, available in R. Now in my particular case I would like to draw confidence bands on the plot and show that there are differences. Unfortunately, I do not know how to
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
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 :
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
2005 May 31
0
prediction using gls with correlated residuals
Dear all, I am a beginner user of R and I tried to fit a gls model with explanatory variables and an AR(1) correlation component using the function "gls" with: correlation = corAR1 (form = ~ 1) It should mean that the residual follows an AR(1) process, isn't it? The problem is that, if I use the funcion "predict" I noticed that the predicted values are the same as if I
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
2005 Apr 20
2
Package under R 2.1.0: package.rds
Hi everybody, I have trouble installing my own package under R 2.1.0 (it is fine under R 2.0.1). My OS is Windows NT. I installed my package 'mag' by using menu "Packages/Install package from local zip files....". It's fine (html package description was updated). But when I typed in library(mag) it gave me error: Error in library(mag) : there is no package called
2008 Feb 08
0
User specified correlation structure (e.g., 2-banded Toeplitz)
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
2008 Feb 08
0
User-specified correlation structure (e.g., 2-banded Toeplitz)
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
2003 Aug 06
1
Standard error of standard deviation: bootstrap or theoretical results?
Dear R users, This is more a statistical question rather than an R question. I'd appreciate it if you can give me some suggestions. I have a sample of a time series (sample size 500, fat tail in density). I am trying to calculate the Standard error of standard deviation of a sub-block-sample (sample size 250). I take 100 this kind of sub-block-sample, randomly. For these 100 subsamples, I