Hello, I was wondering whether there had been any progress on this bug yet? I have checked for updates to the package and it doesn't seem that there have been any, but I might be mistaken! Similarly to Mark, I am getting the following error message when running a Gls with two (factor) covariates (the same code works with two covariates in the nlme gls function). The Gls function works fine when I just use a single covariate.
Error message copied below: Loading required package: nlme Error in recalc.corAR1(object[[i]], conLin) : NA/NaN/Inf in foreign function call (arg 1) In addition: Warning message: package 'nlme' was built under R version 2.13.2 > sessionInfo() R version 2.13.0 (2011-04-13) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] C/en_US.UTF-8/C/C/C/C attached base packages: [1] splines stats graphics grDevices utils datasets methods base other attached packages: [1] nlme_3.1-103 rms_3.4-0 Hmisc_3.9-1 survival_2.36-12 lattice_0.19-33 loaded via a namespace (and not attached): [1] cluster_1.14.2 grid_2.13.0 tools_2.13.0 Thanks, Alice Jones Frank Harrell wrote > > Appears to be a definite bug, probably caused by having more than one > correlation parameter. I hope to have this fixed within 3 days. > Frank > > > Mark Seeto wrote >> >> 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 `coef<-.corARMA`(`*tmp*`, value = value[parMap[, i]]) : >> # NA/NaN/Inf in foreign function call (arg 1) >> Gls(y ~ x, data=d, correlation = corARMA(p=1)) #This works >> >> I would rather use Gls than gls so that I can represent a variable >> with a spline using rcs. I'm using version 3-5.0 of rms in R 2.15.0. >> >> Thanks for any help you can give. >> >> Mark Seeto >> >> ______________________________________________ >> R-help@ mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > -- View this message in context: http://r.789695.n4.nabble.com/Gls-function-in-rms-package-tp4569521p4599087.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.