simu_sd: Individual variation (Heterogeneity) based on simulated...

View source: R/fcts RSF.R

simu_sdR Documentation

Individual variation (Heterogeneity) based on simulated coefficients

Description

Calculate heterogeneity for each replicate of simulated coefficients

Usage

simu_sd(simu)

Arguments

simu

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

Value

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

Examples

data(goats)
ls1<-list()
ls1[[1]]<-as.formula(STATUS~ELEVATION+SLOPE+ET+ASPECT+HLI+TASP)
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)
sd<-simu_sd(simu)
colnames(sd)<-names(coef)
head(sd)
apply(sd, 2, quantile, na.rm=T) #Show variation around estimate of each covariate
colMeans(sd) #Calculate average heterogeneity for each covariate

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