Hi:

On Sun, Sep 26, 2010 at 4:24 AM, Manuel Spínola <mspinola10@gmail.com>wrote:

>  Dear list members,
>
> I am fitting a repeated measure model using lme.
> I have 4 measurements of a rate (variable called ipa) measured each year
> (variable called tempo, which was centered) on 48 counties (all the counties
> from a province, variable called localidad).
> I am considering county like a random factor.
> My models are:
>
> model1 = lme(ipa ~ tempo, data=ipa, random = ~1 | localidad) # random
> intercept
>

I'm more concerned about model2. I think you want

model2 = lme(ipa ~ tempo, random = ~ tempo | localidad, data=ipa)

See the analysis of covariance example in section 1.4 of Pinheiro and Bates
(2000, pp. 35-37) for a parallel example to yours.

model2 = lme(ipa ~ tempo, random = ~1 | tempo/localidad, data=ipa) # random
> intercept and slope
>
> The correlation structure is within unit, which appears to be localidad.
I'm not sure you really need to specify the form; it should compute the
autocorrelations in time/tempo by default, I would think.

model3 = lme(ipa ~ tempo, random = ~1 | localidad, data=ipa,
> correlation=corAR1(form=~ tempo))
>
> I have heteroscedasticity.
> Is my last model dealing with heteroscedasticity?
>

No, the varFunc classes deal with heteroscedasticity; the corFunc classes
pertain to the within-unit correlation structure, typically in time (but
occasionally in space). See section 5.2 of P & B (p. 206ff) for the variance
structure functions - a summary table is found on p. 208.

HTH,
Dennis


> Thank you very much in advance.
> Best,
>
> Manuel
>
> --
> Manuel Spínola, Ph.D.
> Instituto Internacional en Conservación y Manejo de Vida Silvestre
> Universidad Nacional
> Apartado 1350-3000
> Heredia
> COSTA RICA
> mspinola@una.ac.cr
> mspinola10@gmail.com
> Teléfono: (506) 2277-3598
> Fax: (506) 2237-7036
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]


