[R-sig-ME] help on choosin right model for data

Ben Bolker bbolker at gmail.com
Sat Aug 30 04:10:34 CEST 2014


Josipa Perković <josipa at ...> writes:

> I would appreciate if you could help me choose different R packages and
> writing model to analyze
> 
> what I believe to be unequally spaced repeated measurement data. 
> 
> My data consists of data on PAR (photosinthetically active radiation)
> -average and maximum daily PAR, collected successively every 10 min with
> data loggers.
> 
> Sensors were positioned above different mulches 
> (sub factor in three levels)
> with differently fertilized plant canopy 
> (main factor in 4 levels), so there
> are two different factors influencing AVG and MAX PAR.
> 
> Also since sensors weren't positioned in repetitions
>  I divided data in every
> 10 min, 15 min and 25 min sequence for AVG and MAX 
> for each sensor.  
> 
> So the experiment is two-factorial (fertilizers (4) 
> and mulch (3) ) but has
> time dimension too.
> 

  Are there multiple sensors within each mulch*fertilizer
combination?  If so, I would suggest starting with something lme,
and using something like

  avg_PAR ~ mulch*fertilizer , random = ~1|sensorID,
correlation=corAR1(form=~1|time)

Don't know how much of the day your data covers, but you might want
a term like

 cos(2*pi*time)+sin(2*pi*time)

or

  ns(time,5)  [a 5-knot spline; you'll need library(splines) first

where time is fraction-of-day [0,1] in the first case, scaling doesn't
matter in the second case.

 You might also need to consider a long-term time trend (linear or
quadratic or spline).

  You should definitely graph your data.

  Pinheiro and Bates (2000) might be useful.

 Ben Bolker



More information about the R-sig-mixed-models mailing list