Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

univariatePrior

Univariate priors commonly used in IFA models


Description

The returned model evaluates to the fit of the priors in deviance (-2 log likelihood) units. The analytic gradient and Hessian are included for quick optimization using Newton-Raphson.

Usage

univariatePrior(type, labels, mode, strength = NULL, name = "univariatePrior")

Arguments

type

one of c("lnorm","beta","logit-norm")

labels

a vector of parameters to which to apply the prior density

mode

the mode of the prior density

strength

a prior-specific strength (optional)

name

the name of the mxModel returned

Details

Priors of type 'beta' and 'logit-norm' are commonly used for the lower asymptote parameter of the 3PL model. Both of these priors assume that the parameter is in logit units. The 'lnorm' prior can be used for slope parameters.

Value

an mxModel that evaluates to the prior density in deviance units

Examples

model <- univariatePrior("logit-norm", "x1", -1)
model$priorParam$values[1,1] <- -.6
model <- mxRun(model)
model$output$fit
model$output$gradient
model$output$hessian

ifaTools

Toolkit for Item Factor Analysis with 'OpenMx'

v0.22
AGPL (>= 3)
Authors
Joshua N. Pritikin [cre, aut]
Initial release
2020-09-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.