Thank you very much for your answer.
I begun to read the workshop notes.
My dataset is named "Milouin". The
Year variable is declared as a factor.
This is my R code :
- Code: Select all
load("donnees_Rmark5.0.RData")
milouin$Year=factor(milouin$Year)
run.milouin=function()
{
Model1=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~Year + Predation + Water20 + Willow + Meadow20)),
groups=c("Year"))
Model2=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~Year + Predation + Water20 + Willow + Meadow20 + Precipitation)), groups=c("Year"))
Model3=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~Year + Predation + Water20 + Willow + Meadow20 + Water_level)), groups=c("Year"))
Model4=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~Year + Predation + Water20 + Willow + Meadow20 + Temperature)), groups=c("Year"))
return(collect.models() )
}
milouin.results=run.milouin()
milouin.results
The Model 1 is my best model. When I try to add my weather variables (one value for each year), Model 2, 3 and 4 have the same deviance than the Model 1. But I have the warning "
Note: only 9 parameters counted of 10 specified parameters _ AICc and parameter count have been adjusted upward So that is why I thought my weather covariables were not taken into account.
However, when I only try to test the weather variables separately, parameters are well estimated
- Code: Select all
Model5=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~ Temperature)),
groups=c("Year"))
Model6=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~ Precipitation)),
groups=c("Year"))
Model7=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~ Water_level)),
groups=c("Year"))
Model8=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~Year + Temperature)),
groups=c("Year"))
Model9=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~Year + Precipitation)),
groups=c("Year"))
Model10=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~Year + Water_level)),
groups=c("Year"))
Model11=mark(milouin,nocc=386,model="Nest",
model.parameters=list(S=list(formula=~Year)),
groups=c("Year"))
Model5, Model 6 and Model 7 have a different deviance (respectively 1178.810, 1165.858 and 1185.273).
If I try to add the
Year effect: Model8, 9 and 10 have the same deviance than Model 11.
model npar AICc DeltaAICc weight Deviance
7 S(~Year) 6 1102.308 0.000000 4.758550e-01 1090.296
1 S(~Year + Temperature) 7 1104.312 2.003914 1.747150e-01 1090.296
2 S(~Year + Precipitation) 7 1104.312 2.003914 1.747150e-01 1090.296
3 S(~Year + Water_level) 7 1104.312 2.003914 1.747150e-01 1090.296
5 S(~Precipitation) 2 1169.859 67.551139 1.020778e-15 1165.858
4 S(~Temperature) 2 1182.811 80.502939 0.000000e+00 1178.810
6 S(~Water_level) 2 1189.275 86.966839 0.000000e+00 1185.273
I don't know why weather variables cannot be estimated. Do you have an hypothesis ? Or is it my mistake ?
Thank you very much for your time
Ben