getTheta is a helper function for obtaining theta estimates. Estimates are obtained using an expected a posteriori (EAP) method.

getTheta(
  data,
  ipar,
  scale = "combined",
  theta_grid = seq(-4, 4, 0.1),
  prior_dist = "normal",
  prior_mean = 0,
  prior_sd = 1
)

Arguments

data

a PROsetta_data object.

ipar

a data.frame containing item parameters.

scale

the index of the scale to use. combined refers to the combined scale. (default = combined)

theta_grid

the theta grid to use for numerical integration. (default = seq(-4, 4, .1))

prior_dist

the type of prior distribution. Accepts normal or logistic. (default = normal)

prior_mean

mean of the prior distribution. (default = 0.0)

prior_sd

SD of the prior distribution. (default = 1.0)

Value

getTheta returns a list containing EAP estimates.

Examples

x <- runLinking(data_asq, method = "FIXEDPAR")

o <- getTheta(data_asq, x$ipar_linked, scale = 1)
o$theta
o$item_idx

o <- getTheta(data_asq, x$ipar_linked, scale = 2)
o$theta
o$item_idx

o <- getTheta(data_asq, x$ipar_linked, scale = "combined")
o$theta
o$item_idx