example.data: Simulated data from Cormack-Jolly-Seber model

example.dataR Documentation

Simulated data from Cormack-Jolly-Seber model

Description

A simulated data set from CJS model to demonstrate use of grouping variables and individual covariates in an analysis of a mark model. The true model for the simulated data is S(age+year)p(year).

Format

A data frame with 6000 observations on the following 5 variables.

ch

a character vector

weight

a numeric vector

age

a factor with levels 1 2 3

sex

a factor with levels F M

region

a factor with levels 1 2 3 4

Details

The 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.

Examples


# This example is excluded from testing to reduce package check time
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),delete=TRUE)
mod2=mark(example.data,model.parameters=list(p=pTimec,Phi=PhiTime),
          groups=c("sex","age","region"),initial.ages=c(0,1,2),delete=TRUE)
mod3=mark(example.data,model.parameters=list(Phi=Phidot,p=pTime),
          groups=c("sex","age","region"),initial.ages=c(0,1,2),delete=TRUE)
mod4=mark(example.data,model.parameters=list(Phi=PhiTime),
          groups=c("sex","age","region"),initial.ages=c(0,1,2),delete=TRUE)
mod5=mark(example.data,model.parameters=list(Phi=PhiTimeAge),
          groups=c("sex","age","region"),initial.ages=c(0,1,2),delete=TRUE)
mod6=mark(example.data,model.parameters=list(Phi=PhiAge,p=pTime),
          groups=c("sex","age","region"),initial.ages=c(0,1,2),delete=TRUE)
mod7=mark(example.data,model.parameters=list(p=pTime,Phi=PhiweightTime),
          groups=c("sex","age","region"),initial.ages=c(0,1,2),delete=TRUE)
mod8=mark(example.data,model.parameters=list(Phi=PhiTimeAge,p=pTime),
          groups=c("sex","age","region"),initial.ages=c(0,1,2),delete=TRUE)
return(collect.models())
}
example.results=run.example()


RMark documentation built on Aug. 14, 2022, 1:05 a.m.

Related to example.data in RMark...