simu_rev3: Temporal reversal (with THREE time periods) based on...

View source: R/fcts RSF.R

simu_rev3R Documentation

Temporal reversal (with THREE time periods) based on simulated coefficients

Description

Calculate temporal reversal for each replicate of simulated coefficients

Usage

simu_rev3(simu, col1, col2, col3)

Arguments

simu

An array of simulated individual coefficients based on their uncertainties(output of simu_coefs)

col1

Column of the variable of interest for the 1st temporal period

col2

Column of the variable of interest for the 2nd temporal period

col3

Column of the variable of interest for the 3rd temporal period

Value

A matrix of reversal (one value for each covariates and replicates)

Examples

data(goats)
goats$Season<-c("1", "2", "3")
ls1<-list()
ls1[[1]]<-as.formula(STATUS~(ELEVATION+SLOPE+ET+ASPECT+HLI+TASP):Season)
out<-rsf_ind(goats$ID, data=goats, form_ls=ls1)
coef<-ind_coef(m=1, out)
se<-ind_se(m=1, out)
simu<-simu_coefs(coef, se, n=100)
head(coef)
rev_elevation<-simu_rev3(simu, 3, 4,5) #Calculate specialization for elevation covariate
quantile(rev_elevation) #Show variation around estimate of elevation covariate
mean(rev_elevation) #Calculate average reversal for elevation covariate

BastilleRousseau/IndRSA documentation built on Jan. 28, 2024, 2:14 a.m.