With the following dataset, I wanted to see if the response (effect) changes with regard to sites, season, duration, and their interactions. Some online forums on statistics suggested me to go on with Linear Mixed-Effects Models, but the problem is that since replicates are randomised within each station, I have little chance to collect the sample from exactly the same spot in successive seasons (for example, repl-1 of s1 of post-monsoon may not be the same as that of monsoon). It is unlike the clinical trials (with within-subject design) where you measure the same subject repeatedly over seasons. However, considering sites and season as a random factor I ran the following commands and received a warning message:
Warning messages:
1: In checkConv(attr(opt, "derivs"), optpar,ctrl=controlpar,ctrl=controlcheckConv,
: unable to evaluate scaled gradient
2: In checkConv(attr(opt, "derivs"), optpar,ctrl=controlpar,ctrl=controlcheckConv,
: Model failed to converge: degenerate Hessian with 1 negative eigenvalues
Can anyone help me solve the issue? The codes are given below:
library(lme4)
read.table(textConnection("duration season sites effect
4d mon s1 7305.91
4d mon s2 856.297
4d mon s3 649.93
4d mon s1 10121.62
4d mon s2 5137.85
4d mon s3 3059.89
4d mon s1 5384.3
4d mon s2 5014.66
4d mon s3 3378.15
4d post s1 6475.53
4d post s2 2923.15
4d post s3 554.05
4d post s1 7590.8
4d post s2 3888.01
4d post s3 600.07
4d post s1 6717.63
4d post s2 1542.93
4d post s3 1001.4
4d pre s1 9290.84
4d pre s2 2199.05
4d pre s3 1149.99
4d pre s1 5864.29
4d pre s2 4847.92
4d pre s3 4172.71
4d pre s1 8419.88
4d pre s2 685.18
4d pre s3 4133.15
7d mon s1 11129.86
7d mon s2 1492.36
7d mon s3 1375
7d mon s1 10927.16
7d mon s2 8131.14
7d mon s3 9610.08
7d mon s1 13732.55
7d mon s2 13314.01
7d mon s3 4075.65
7d post s1 11770.79
7d post s2 4254.88
7d post s3 753.2
7d post s1 11324.95
7d post s2 5133.76
7d post s3 2156.2
7d post s1 12103.76
7d post s2 3143.72
7d post s3 2603.23
7d pre s1 13928.88
7d pre s2 3208.28
7d pre s3 8015.04
7d pre s1 11851.47
7d pre s2 6815.31
7d pre s3 8478.77
7d pre s1 13600.48
7d pre s2 1219.46
7d pre s3 6987.5
"),header=T)->dat1
m1 = lmer(effect ~ duration + (1+duration|sites) +(1+duration|season),
data=dat1, REML=FALSE)