gjamConditionalParameters: Parameters for gjam conditional prediction

View source: R/gjamHfunctions.R

gjamConditionalParametersR Documentation

Parameters for gjam conditional prediction

Description

Conditional parameters quantify the direct effects of predictors including those that come through other species.

Usage

  gjamConditionalParameters(output, conditionOn, nsim = 2000)

Arguments

output

object of class "gjam".

conditionOn

a character vector of responses to condition on (see Details).

nsim

number of draws from the posterior distribution.

Details

Responses in ydata are random with a joint distribution that comes through the residual covariance having mean matrix parameters$sigMu and standard error matrix parameters$sigSe. Still, it can be desirable to use some responses, along with covariates, as predictors of others. The responses (columns) in ydata are partitioned into two groups, a group to condition on (the names included in character vector conditionOn) and the remaining columns. conditionOn gives the names of response variables (colnames for ydata). The conditional distribution is parameterized as the sum of effects that come directly from predictors in xdata, in a matrix C, and from the other responses, i.e., those in conditionOn, a matrix A. A third matrix P holds the conditional covariance. If dimension reduction is used in model fitting, then there will some redundancy in conditional coefficients.

See examples below.

Value

Amu

posterior mean for matrix A.

Ase

standard error for matrix A.

Atab

parameter summary for matrix A.

Cmu

posterior mean for matrix C.

Cse

standard error for matrix C.

Ctab

parameter summary for matrix C.

Pmu

posterior mean for matrix P.

Pse

standard error for matrix P.

Ptab

parameter summary for matrix P.

Author(s)

James S Clark, jimclark@duke.edu

References

Qiu, T., S. Shubhi, C. W. Woodall, and J.S. Clark. 2021. Niche shifts from trees to fecundity to recruitment that determine species response to climate change. Frontiers in Ecology and Evolution 9, 863. 'https://www.frontiersin.org/article/10.3389/fevo.2021.719141'.

See Also

gjamSimData simulates data

gjam fits the model

A more detailed vignette is can be obtained with:

browseVignettes('gjam')

web site 'http://sites.nicholas.duke.edu/clarklab/code/'.

Examples

## Not run: 
f   <- gjamSimData(n = 200, S = 10, Q = 3, typeNames = 'CA') 
ml  <- list(ng = 2000, burnin = 50, typeNames = f$typeNames, holdoutN = 10)
output <- gjam(f$formula, f$xdata, f$ydata, modelList = ml)

# condition on three species
gjamConditionalParameters( output, conditionOn = c('S1','S2','S3') )

## End(Not run)

gjam documentation built on May 24, 2022, 1:06 a.m.