lincon: Test Linear Constraints.

Description Usage Arguments Details Value Author(s) Examples

View source: R/auxiliar_functions.r

Description

lincon tests a set of linear constraints by means of the Wald statistic.

Usage

1
  lincon(mod, R, b, cov_type = 'hessian')

Arguments

mod

A fitted rasch model.

R

A numeric matrix containging up to q rows (one per constraint) and as many columns as parameters the model has.

b

A vector of length q.

cov_type

A character indicating which covariance matrix estimation is to be used. Possible choices are 'hessian', 'opg' and 'sandwich'.

Details

Linear constraints are specified in the form:

R * θ = b

Where R is a matrix of dimensions q*p. The vector b might be specified either as a numeric object or as a one column matrix. The p-value is approximated by an F distribution with q and n - p degres of freedom.

Value

A data.frame containing the value of the statistic, degrees of freedom and p-value.

Author(s)

Fernando Massa, fmassa@iesta.edu.uy

Examples

1
2
3
4
5
6
7
n   <- 100
X   <- sim_rasch(n)
mod <- rasch(X)
# test equality of delta_1 and delta_2.
R <- matrix(c(1, -1, 0, 0, 0, 0, 0), nrow = 1)
b <- 0
lincon(mod, R = R, b = b)

nando11235813/raschreg documentation built on Oct. 2, 2021, 3:11 p.m.