View source: R/gjamHfunctions.R
gjamConditionalParameters | R Documentation |
Conditional parameters quantify the direct effects of predictors including those that come through other species.
gjamConditionalParameters(output, conditionOn, nsim = 2000)
output |
object of |
conditionOn |
a |
nsim |
number of draws from the posterior distribution. |
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.
|
posterior mean for matrix |
|
standard error for matrix |
|
parameter summary for matrix |
|
posterior mean for matrix |
|
standard error for matrix |
|
parameter summary for matrix |
|
posterior mean for matrix |
|
standard error for matrix |
|
parameter summary for matrix |
James S Clark, jimclark@duke.edu
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'.
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/'.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.