The gls (generalized least squares) function in the nlme package should do what you want. (I assume that your analysis leads you to expect an error-covariance matrix of a specific form with some free parameters to estimate.)
Generalized least squares estimation is a common topic in regression texts. You'll find a brief appendix on the subject from my R and S-PLUS Companion to Applied Regression, in the context of time-series regression, at <http://www.socsci.mcmaster.ca/jfox/Books/Companion/appendix-timeseries-regression.pdf>.
I hope that this helps, John
At 11:40 PM 6/12/2003 -0400, Andy Jacobson wrote:
Greetings,
I would like to fit a multiple linear regression model in which the residuals are expected to follow a multivariate normal distribution, using weighted least squares. I know that the data in question have biases that would result in correlated residuals, and I have a means for quantifying those biases as a covariance matrix. I cannot, unfortunately, correct the data for these biases.
It seems that this should be a straightforward task, but so much of the literature is concerned with the probability model in which the residuals are uncorrelated that I can't find a good reference. So in order of importance, please, can someone point me to a definitive reference for least squares with correlated residuals, and is there a standard R package to handle this case?
Many thanks in advance,
Anthony
----------------------------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: [EMAIL PROTECTED] phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
