simu_cons3: Temporal consistency (with THREE time periods) based on...

View source: R/fcts RSF.R

simu_cons3R Documentation

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

Description

Calculate temporal consistency for each replicate of simulated coefficients

Usage

simu_cons3(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 consistency (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)
cons_elevation<-simu_cons3(simu, 3, 4,5) #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.