Skip to contents

A wrapper to compute the SE of a fitted object by mmgsem(). It obtains the SE by numerically computing the second derivative of the loglikelihood function.

Usage

compute_se(object, d = 1e-03, naive = FALSE, nuisance = FALSE,
  hessian_tol = 1e-05)

Arguments

object

A fitted model returned by the mmgsem function.

d

Step size for numerical approximation of the derivative. Default is 1e-03.

naive

Logical. If TRUE, returns uncorrected SEs (faster but less accurate). If FALSE (default), applies the correction for step-wise estimation.

nuisance

Logical. If TRUE, includes nuisance parameters (parameters from empty group-cluster combinations). Default is FALSE.

hessian_tol

Relative tolerance for the generalized inverse of the Hessians. Singular values at or below this fraction of the largest are excluded. Must be between 0 and 1; the default is 1e-05.

Value

SE_vector: List. Includes several vectors that contain the standard errors per type of parameter (beta, psi, etc.)