# [R] Joint confidence intervals for GLS models?

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

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)

> 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:

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.