simu_cons2: Temporal consistency (with TWO time periods) based on...

View source: R/fcts RSF.R

simu_cons2R Documentation

Temporal consistency (with TWO time periods) based on simulated coefficients

Description

Calculate temporal consistency for each replicate of simulated coefficients

Usage

simu_cons2(simu, col1, col2)

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

Value

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

Examples

data(goats)
goats$Season<-c("1", "2")
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)
cons_elevation<-simu_cons2(simu, 3, 4) #Calculate specialization for elevation covariate
quantile(cons_elevation) #Show variation around estimate of elevation covariate
mean(cons_elevation) #Calculate average consistency for elevation covariate

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