probit: Probit analysis with random effects

Description Usage Arguments Value Note

View source: R/probit.R

Description

Separate analysis over items.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
probit(
  fixed,
  random,
  subject.name = "id",
  dependence = "marginal",
  Gamma = NULL,
  item.name = "item",
  response.name = NULL,
  data,
  data.long = NULL,
  mu = NULL,
  psi = NULL,
  B = 300,
  BB = 50,
  maxit = 20,
  sig.level = 0.6,
  verbose = 0
)

Arguments

fixed

Model formula for the fixed effect, where multivariate responses may be given additively on the left hand side. Responses must be ordered factors.

random

List of formulas for the random effects. Models are fitted on first appearance observations.

subject.name

Character string with name of categorical variable encoding subjects.

dependence

Text string ("marginal" or "joint") deciding whether random effects are assumed independent or with a common joint normal distribution. Default: dependence="marginal".

Gamma

Choleskey factor for initial variance of random effects. If Gamma=NULL then initialized at identity matrix. Default: Gamma=NULL.

item.name

Character string with name of generated variable identifying the items. Defaults to item.name="item".

response.name

Character string with name of generated variable containing the responses. Defaults to response.name=NULL, which corresponds to adding ".value" to item.name.

data

Date frame with data on the wide format.

data.long

Possible additional long format data frame with item level explanatory variables. Presently not implemented!

mu

Matrix (no subjects, q) of initial estimates for mu.

psi

Matrix (no subjects, q*(q+1)/2) of initial estimates for psi.

B

Number of simulations in minimization step. Default: B=300.

BB

Number of simulations per subject in maximization step. Default: BB=50.

maxit

Maximal number of minimization-maximization steps. Default: maxit=20.

sig.level

Significance level at which the iterative stochastic optimizations will be stopped. Defaults to sig.level=0.60.

verbose

Numeric controlling amount of convergence diagnostics. Default: verbose=0. Level 1 gives progress bar and convergence statistics. Level 2 also gives diagnostics for maximization step. Level 3 also gives graphical diagnostics for minimization step.

Value

probit-class object.

Note

A data frame must be provided, i.e. the data option is not optional. Variables that coincide with random effects, item identifier or internal name for item response will be removed from data, and an warning will be issued.

The minimization step is implemented via future_map. This implies that the user may activate parallel computations by calling plan, e.g. future::plan("multisession", workers = 4).


bomarkussen/probit documentation built on April 3, 2021, 7:38 p.m.