Dear Thierry,
Thanks for this useful message. For me to get the initial value of range
and nugget, I think I need to get the initial estimate through empirical
variogram of the residual from the model. What do you think? I understand
your message that to fit other correlation structure models from model
which assumes independent of residuals, it has to be
model.sph <- update(model.vc, corSpher(form = ~easting + northing, nugget =
TRUE))
 or
model.sph <- gls(yield ~ 1, corr = CorSpher(form = ~ easting + northing,
nugget = TRUE), method="ML")
where
model.vc<-gls(yield~ easting+ northing, method="ML").

Since  we are interested in modeling the spatial structure of residuals in
variogram modelling, am I right to estimate my geostatistical parameters
fro,
resid <- residuals(model.vc)
varog<-variogram(resid~1,form=~easting + northing)
plot(varog)

I appreciate you prompt response to my request, please.

Thank you.

Moshood



On Fri, Jul 19, 2013 at 2:04 AM, ONKELINX, Thierry <Thierry.ONKELINX@inbo.be
> wrote:

> Dear Moshood,
>
> Pleasenotethataddingspacestoyourcodemakesyourcodemuchmorereadable
>
> You want
> model.vc <- gls(yield ~ easting + northing, method = "ML")
> model.sph <- update(model.vc, corSpher(form = ~easting + northing, nugget
> = TRUE))
>
> which is equivalent to
> model.sph <- gls(yield ~ 1, corr = CorSpher(form = ~ easting + northing,
> nugget = TRUE), method="ML")
>
> Save the residuals and modeling those again is not a good idea.
>
> Best regards,
>
> Thierry
>
> PS I recommend setting some sensible starting values for the range and
> nugget. With the default range the optimizer tends to get stuck at very
> small ranges.
>
> ir. Thierry Onkelinx
> Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
> Forest
> team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
> Kliniekstraat 25
> 1070 Anderlecht
> Belgium
> + 32 2 525 02 51
> + 32 54 43 61 85
> Thierry.Onkelinx@inbo.be
> www.inbo.be
>
> To call in the statistician after the experiment is done may be no more
> than asking him to perform a post-mortem examination: he may be able to say
> what the experiment died of.
> ~ Sir Ronald Aylmer Fisher
>
> The plural of anecdote is not data.
> ~ Roger Brinner
>
> The combination of some data and an aching desire for an answer does not
> ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
>
> -----Oorspronkelijk bericht-----
> Van: r-sig-geo-bounces@r-project.org [mailto:
> r-sig-geo-bounces@r-project.org] Namens Moshood Agba Bakare
> Verzonden: vrijdag 19 juli 2013 1:22
> Aan: r-sig-geo@r-project.org
> Onderwerp: [R-sig-Geo] spatial correlation model and variogram
>
> Dear All,
> Consider yield as attribute and easting and northing in meters as spatial
> coordinates.
> I used gls function of nlme package because of spatial dependency of the
> residual. I tried to remove large-scale trend by using the easting and
> northing as covariates of yield.
>
> model.vc<-gls(yield~easting+northing,method="ML").
>
> Being a spatial data, we are most interested in carrying out variogram
> modelling of the spatial structure on the small-scale component i.e. the
> residual and equally fit the spatial correlation structure on the residual
> as well.
>
> Do I need to obtain the residual from the model.vc above i.e
> resid<-residuals(model.vc) and fit the other models as follow
>
> model.sph<-gls(resid~1,corr=CorSpher(form=~easting+northing, nugget=T)) or
> model.sph<-update(model.vc,corSpher(form=~easting+northing,nugget=T))
>
> Please which one is correct.
>
> Thank you.
> Moshood
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> * * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
> Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver
> weer en binden het INBO onder geen enkel beding, zolang dit bericht niet
> bevestigd is door een geldig ondertekend document.
> The views expressed in this message and any annex are purely those of the
> writer and may not be regarded as stating an official position of INBO, as
> long as the message is not confirmed by a duly signed document.
>
>

	[[alternative HTML version deleted]]

