simu_spe | R Documentation |
Calculate specialization for each replicate of simulated coefficients
simu_spe(simu)
simu |
An array of simulated individual coefficients based on their uncertainties(output of simu_coefs) |
A matrix of specialization (one value for each covariates and replicates)
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)
spe<-simu_spe(simu)
colnames(spe)<-names(coef)
head(spe)
apply(spe, 2, quantile, na.rm=T) #Show variation around estimate of each covariate
colMeans(spe) #Calculate average specialization for each covariate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.