Learn R Programming

ordinalTables (version 1.0.0.3)

Goodman_fixed_parameter: Fits the model with given parameters fixed to specific values.

Description

The model has simple closed form solutions when fitting either the unconstrained version of the version that species equality of delta parameters. However, I could not see how to adapt that to the case where specific parameters were constrained to have a specific value. This routine is to fit that model. It will also fit the unconstrained model, but Goodman gives the estimator for that case.

Usage

Goodman_fixed_parameter(
  n,
  delta,
  fixed,
  convergence = 1e-04,
  max_iter = 50,
  verbose = FALSE
)

Value

list containing phi, delta, max_change largest change in parameter for last the iteration, chisq: Pearson chi-square g_squared: likelihood ratio G^2 df: degrees of freedom

Arguments

n

the r X r matrix of observed counts

delta

the vector of asymmetry r - 1 parameters

fixed

r - 1 logical vector that specifies whether a delta parameter is fixed (TRUE) or allowed to be estimated (FALSE).

convergence

maximum change in a parameter across iterations. Default is 1.0e-4

max_iter

maximum number of iterations, Default is 50.

verbose

should progress information be printed to the console. Default is FALSE, do not print.

See Also

[Goodman_diagonals_parameter_symmetry()]

[Goodman_ml()]

Examples

Run this code
fixed <- c(FALSE, TRUE, FALSE)
delta <- c(1.0, 1.0, 1.0)
phi <- matrix(0.0, nrow=4, ncol=4)
diag(phi) = rep(1.0, 4)
Goodman_fixed_parameter(vision_data, delta, fixed)

Run the code above in your browser using DataLab