data(chinook_length) #Chinook salmon offspring length
## Standard additive genetic, non-additive genetic, and maternal variance analysis
length_mod1<- observLmer(observ=chinook_length,dam="dam",sire="sire",response="length")
length_mod1
## Confidence intervals
##Bootstrap resampling of data: replicates within family
if (FALSE) resampRepli(dat=chinook_length,copy=c(3:8),family="family",replicate="repli",
iter=1000)
#saves the files in working directory: one for each replicate and
#one final (combined) file "resamp_datR.csv"
##Import file
#length_datR<- read.csv("resamp_datR.csv")
data(chinook_resampL) #same as length_datR, 5 iterations
##Models for the resampled data: standard analysis
if (FALSE) length_rcomp<- resampLmer(resamp=length_datR,dam="dam",sire="sire",
response="length",start=1,end=1000)
## 1. Uncorrected Bootstrap 95% confidence interval
#ciMANA(comp=length_rcomp)
data(chinook_bootL) #similar to length_rcomp, but 1,000 models
ciMANA(comp=chinook_bootL)
## 2. Bias and accelerated corrected Bootstrap 95% confidence interval
##Jackknife resampling of data, delete-one: for acceleration estimate
if (FALSE) length_jack<- JackLmer(observ=chinook_length,dam="dam",sire="sire",
response="length")
#ciMANA(comp=length_rcomp,bias=c(0,0.7192,0.2030),accel=length_jack)
data(chinook_jackL) #similar to length_jack, but all observations
ciMANA(comp=chinook_bootL,bias=c(0,0.7192,0.2030),accel=chinook_jackL)
##3. Jackknife 95% confidence interval
#ciJack(comp=length_jack,full=c(0,0.7192,0.2030,1.0404))
ciJack(comp=chinook_jackL,full=c(0,0.7192,0.2030,1.0404))
Run the code above in your browser using DataLab