[R] Joint confidence intervals for GLS models?

From: Kennedy David <kennedy_david_at_bah.com>
Date: Wed 09 Aug 2006 - 20:39:11 EST


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 useful because it allows me to calculate confidence intervals for a linear combination of coefficients, but only for OLS models. For example, the code below calculates the confidence interval for the sum of the coefficient of petrol_A and the coefficient of petrol_B:  

> results <- lm(all_rural_count_capita ~ petrol_A + petrol_B +
gdp_capita)
> estimable(results,cm=c(0,1,1,0),conf.int=0.95)

However, the estimable function does not seem to work for GLS objects, as shown below. The estimable documentation confirm that the object must be one of the following: lm, glm, lme, lmer.

> results.gls <- gls(all_rural_count_capita ~ petrol_A + petrol_B +
gdp_capita, correlation=corARMA(p=1),method='ML')
> estimable(results.gls,cm=c(0,1,1,0),conf.int=0.95)
Error in estimable(results.gls, cm = c(0, 1, 1, 0), conf.int = 0.95) :

        obj must be of class 'lm', 'glm', 'aov', 'lme', 'lmer', 'gee', 'geese' or 'nlme'

Therefore, I am looking for a solution to this problem. I think that the solution (if it exists) may be down one of the following paths:  

  1. An alternative command which allows me to generate joint confidence intervals for the objects generated by the gls function. p.s. I note that the intervals function only appears to produce confidence intervals for each coeffcient (not for a linear combination of coeffcients).
  2. An alternative means of generating GLS estimates as lm, glm, lme or lmer objects, so they can be inputed into the estimable function.

Regards,
David

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch 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. Received on Wed Aug 09 20:49:30 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 10 Aug 2006 - 02:19:42 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.