deriv_prior: A collection of gradient for common priors.

Description Usage Arguments Value Author(s) References

View source: R/algorithms__deriv_prior.R

Description

The parameters after "..." should be matched exactly.

Usage

1
deriv_prior(B, priorArgs, hessMethod)

Arguments

B

"matrix". The paramter that need to be added with a prior. The gradient and hessian are calculated conditional on B. B should be always an one-column matrix,

priorArgs

"list". priorArgs$prior_type: when prior_type is set to "mvnorm", you have to provide priorArgs$mean: "matrix", the mean of parameter, mu0 should be always an one-column matrix; priorArgs$covariance: "matrix", the covariance matrix. A g-prior can be constructed by setting it to X'X, where X is the covariates matrix.; priorArgs$shrinkage: "numeric", the shrinkage for the covariance.

hessMethod

NA

Value

"list". The gradient and hessian matrix, see below. 'gradObsPri' "matrix". One-colunm. 'hessObsPri' "matrix". A squre matrix. Dimension same as prior_type$Sigma0.

Author(s)

Feng Li, Department of Statistics, Stockholm University, Sweden.

References

NA


feng-li/movingknots documentation built on March 30, 2021, 11:58 a.m.