similar to: Gls function in rms package

Displaying 20 results from an estimated 2000 matches similar to: "Gls function in rms package"

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
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 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
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 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
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 :
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
2007 Jul 31
5
Plotting a smooth curve from predict
Probably a very simple query: When I try to plot a curve from a fitted polynomial, it comes out rather jagged, not smooth like fitted curves in other stats software. Is there a way of getting a smooth curve in R? What I'm doing at the moment (for the sake of example) is: > x <- c(1,2,3,4,5,6,7,8,9,10) > y <- c(10,9,8,7,6,6.5,7,8,9,10) > b <- data.frame(cbind(x,y)) >
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,
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,
2005 Aug 29
1
Different sings for correlations in OLS and TSA
Dear list, I am trying to re-analyse something. I do have two time series, one of which (ts.mar) might help explaining the other (ts.anr). In the original analysis, no-one seems to have cared about the data being time-series and they just did OLS. This yielded a strong positive correlation. I want to know if this correlation is still as strong when the autocorrelations are taken into account.
2010 May 28
1
latex.rms and models fit with GLS
Hi, I have fit a model using the rms package with the Gls() function. Is there a way to get the model estimates, std errors, and p-values (i.e. what you get with print(fit)) into latex format? I have tried: f <- Gls(...) latex(f, file='') ... but I get the following error Error in replace.substring.wild(s, old, new, test = test, front = front, : does not handle > 1 * in
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,
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 02
3
Consulta gráfica
  Hola,   Por favor, ¿podríais indicarme qué recursos (librerías o ideas) pueden resultar de utilidad para crear un gráfico del estilo del de la figura 3.8 del siguiente link?   http://www.tsc.uvigo.es/BIO/Bioing/ChrLDoc3.html#3.5   Actualmente estoy utilizando funciones muy básicas y la verdad es que no me encuentro muy satisfecha con el resultado.   Muchas gracias.   Eva [[alternative HTML
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
2010 Aug 23
1
Fitting a regression model with with ARMA error
Hi, I want to fit a regression model with one independent variable. The error part should be fitted an ARMA process. For example, y_t = a + b*x_t + e_t where e_t is modelled as an ARMA process. Please let me know how do I do this in R. What code should I use? TIA Aditya [[alternative HTML version deleted]]
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
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)