mark
model. The true model for the
simulated data is S(age+year)p(year).weight
, age
and region
are
static variables that are defined based on the values
when the animal was released. age
is a factor
variable representing an age level. The actual ages (at
time of release) are 0,1,2 for the 3 levels respectively.data(example.data)
run.example=function()
{
PhiTime=list(formula=~time)
pTimec=list(formula=~time,fixed=list(time=7,value=1))
pTime=list(formula=~time)
PhiAge=list(formula=~age)
Phidot=list(formula=~1)
PhiweightTime=list(formula=~weight+time)
PhiTimeAge=list(formula=~time+age)
mod1=mark(example.data,groups=c("sex","age","region"),
initial.ages=c(0,1,2))
mod2=mark(example.data,model.parameters=list(p=pTimec,Phi=PhiTime),
groups=c("sex","age","region"),initial.ages=c(0,1,2))
mod3=mark(example.data,model.parameters=list(Phi=Phidot,p=pTime),
groups=c("sex","age","region"),initial.ages=c(0,1,2))
mod4=mark(example.data,model.parameters=list(Phi=PhiTime),
groups=c("sex","age","region"),initial.ages=c(0,1,2))
mod5=mark(example.data,model.parameters=list(Phi=PhiTimeAge),
groups=c("sex","age","region"),initial.ages=c(0,1,2))
mod6=mark(example.data,model.parameters=list(Phi=PhiAge,p=pTime),
groups=c("sex","age","region"),initial.ages=c(0,1,2))
mod7=mark(example.data,model.parameters=list(p=pTime,Phi=PhiweightTime),
groups=c("sex","age","region"),initial.ages=c(0,1,2))
mod8=mark(example.data,model.parameters=list(Phi=PhiTimeAge,p=pTime),
groups=c("sex","age","region"),initial.ages=c(0,1,2))
return(collect.models())
}
example.results=run.example()
Run the code above in your browser using DataLab