[R] problem with gls : combining weights and correlation structure
ybas@ens-lyon.fr
ybas at ens-lyon.fr
Tue May 17 15:16:45 CEST 2005
Dear R-users,
I hope you will have time to read me and I will try to be brief. I am also
sorry for my poor english.
I used gls function from the package nlme to correct two types of bias in my
database. At first, because my replicates are spatially aggregated, I would
like to fit a corStruct function like corLin, corSpher, corRatio, corExp or
corGaus in my gls model, and simultaneously, because my response variable is
an estimate, I would like to use weights to take into account the accuracy of
the estimation. I used a varFixed object corresponding to squared standard
error.
Variograms all shows a weak but real spatial autocorrelation (nugget ~ 0.9 but
they always increase with distance).
My first problem was the estimation of the parameters of the corStruc function
which were very far from their order of magnitude (range > 10E15, though the
maximum distance between observations is no more than 10E6).
I thought I had convergence problem that I could solve :
- with at first fitting corStruct functions to variograms with the solver of
Excel
- and secondly binding corStruct parameters to the obtained value with the
argument "fixed=TRUE"
But I obtained very unrealistic values for the parameters of the model even
when the spatial autocorrelation was weak, so I am sure that the model fitting
didn't work properly.
I had absolutely no problems in using the "corr" or the
"weight" arguments
separately.
I thank you very much to read me and if you have a solution to my problem or
if you know where I did a mistake, you would be very nice to answer me.
Sincerely yours,
Yves Bas
More information about the R-help
mailing list