[R-sig-ME] No data for 1 interaction combination: problem in R not in Genstat

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Wed Nov 9 10:28:03 CET 2011


Dear Stephanie,

IMHO the problem is that your model is too complex for your data. The model needs 14 d.f. and your data has only 22 observations.

Best regards,

Thierry

----------------------------------------------------------------------------
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium

Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium

tel. + 32 54/436 185
Thierry.Onkelinx at 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-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-
> bounces at r-project.org] Namens stéphanie braun
> Verzonden: dinsdag 8 november 2011 19:33
> Aan: r-sig-mixed-models at r-project.org
> Onderwerp: [R-sig-ME] No data for 1 interaction combination: problem in R not
> in Genstat
> 
> Dear list member
> I have a similar problem like Roger, but more complex...
> I have two interaction terms that are unoccupied and one interaction term that
> is complete. I would like to test all in the same linear mixed-effects model.
> 
> my data is the following:
> 
>  str(mydata)
> 'data.frame':   22 obs. of  12 variables:
>  $ hare         : chr  "AF" "AH" "AH" "AH" ...
>  $ period       : num  1 2 3 4 5 15 17 6 16 18 ...
>  $ mcp          : num  11.22 4.6 6 8.11 10.51 ...
>  $ k_href       : num  19.25 6.21 7.94 12.14 11.61 ...
>  $ k_hnew       : num  18.36 7.89 9.83 9.84 12.57 ...
>  $ activity     : chr  "a-na" "a-na" "a-na" "a-na" ...
>  $ month        : num  5 7 7 7 7 7 7 7 7 7 ...
>  $ sexfactor    : Factor w/ 2 levels "f","m": 2 1 1 1 1 1 2 1 1 1 ...
>  $ monthfactor  : Factor w/ 4 levels "5","7","8","9": 1 2 2 2 2 2 2 2 2 2 ...
>  $ harvestfactor: Factor w/ 2 levels "harvest","post_harvest": 1 1 1 1 1 1 1 2 2 2
> ...
>  $ monthsex     : Factor w/ 6 levels "f:7","f:8","f:9",..: 4 1 1 1 1 1 5 1 1 1 ...
>  $ monthharvest : Factor w/ 5 levels "harvest:5","harvest:7",..: 1 2 2 2 2 2 2 3 3 3
> ...
> 
> I would like to test the effect of harvest, sex and season (month) on the home-
> range size (k_hnew) of hares.
> 
> monthsex and monthharvest are the interaction terms with unoccupied levels.
> Another interaction term I would like to include in my analysis is sex*harvest (the
> random factors are week and hare).
> I tried the following mixed-effects model:
> 
> model_h_r<-
> lmer(sqrt(k_hnew)~factor(sex)*factor(harvest)+monthsex+monthharvest+(1|we
> ek)+(1|hare),data=mydata)
> object=pvals.fnc(model_h_r, nsim = 10000) object$fixed
> 
> I get the error message:
> error in mer_finalize(ans) : Downdated X'X is not positive definite, 8.
> 
> If I include only one interaction term in the linear mixed-effects model , I don't
> get any error message!
> 
> model_h_r_monthsex<-
> lmer(sqrt(k_hnew)~monthsex+(1|week)+(1|hare),data=mydata)
> object=pvals.fnc(model_h_r_monthsex, nsim = 10000) object$fixed
> 
> model_h_r_harvest_week<-
> lmer(sqrt(k_hnew)~factor(sex)*factor(harvest)+(1|week)+(1|hare),data=mydata
> )
> object=pvals.fnc(model_h_r_harvest_week, nsim = 10000) object$fixed
> 
> model_h_r_monthharvest<-
> lmer(sqrt(k_hnew)~monthharvest+(1|week)+(1|hare),data=mydata)
> object=pvals.fnc(model_h_r_monthharvest, nsim = 10000) object$fixed
> 
> I woul very much appreciate your help!
> Thank you,
> Stéphanie




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