[R] nonpos. def. var-cov matrix

Paul, David A paulda at BATTELLE.ORG
Tue Apr 1 00:06:38 CEST 2003

R 1.6.2 for Windows, Win2k:

I have fitted a weighted least squares model using the code

"wls.out <- gls(y ~ x1 + x2 + x3 + x4 + x5 + x6 - 1, data = foo.frame, 
weights = varConstPower(form = ~ fitted(.), fixed = list(power = 0.5), 
const = 1))"

The data has 62 rows and the response is zero when the covariates are
zero.  The purpose of the model was to account
for the the fact that the variances appear to increase linearly with
the fitted values in diagnostic plots.  When I use 


R1.6.2 yields the message

"Error in intervals.gls(wls7.strat1) : Cannot get confidence 
intervals on var-cov components: Non-positive definite approximate 

Would I be correct in assuming that this means the form of the 
weighting function is incorrect?  How might I examine the estimated
variance-covariance matrix?  Any suggestions would be greatly 


 David Paul

More information about the R-help mailing list