Learn R Programming

ordinalTables (version 1.0.0.3)

Goodman_model_ii: Fits Goodman's (1979) Model II

Description

Fits Goodman's (1979) Model II

Usage

Goodman_model_ii(
  n,
  rho = 1:nrow(n) - (nrow(n) + 1)/2,
  sigma = 1:ncol(n) - (ncol(n) + 1)/2,
  update_rows = TRUE,
  update_columns = TRUE,
  max_iter = 25,
  verbose = FALSE,
  exclude_diagonal = FALSE
)

Value

a list containing alpha: row effects beta: column effects rho: centered row locations mu: row locations sigma: centered column locations nu: column locations log_likelihood: log(likelihood) g_squared: G^2 fit measure chisq: X^2 fit measure df: degrees of freedom

Arguments

n

matrix of observed counts

rho

values of row locations. Default is 1:nrow(n) - (nrow(n) + 1) / 2

sigma

values of column locations. Default is 1:ncol(n) - (ncol(n) + 1) / 2

update_rows

should values of row locations be updated? Default is TRUE, update

update_columns

should value of column locations be updated? Default is TRUE, update

max_iter

maximum number of iterations to perform. Default is 10

verbose

should cycle-by-cycle output be produced? Default is FALSE

exclude_diagonal

logical. Should the diagonal be excluded from the computation. Default is FALSE.