drop1: Add or Drop All Possible Single Terms to a Rasch Model

Description Usage Arguments Details Value Author(s) Examples

Description

drop1 method for class "rasch".

Usage

1
2
  ## S3 method for class 'rasch'
drop1(object, scope = NULL, test = 'LRT', cov_type = 'hessian', scale = 0, k = 2, ...)

Arguments

object

A fitted rasch model.

scope

A formula giving the terms to be considered for dropping.

test

A character string, matchiing one of LRT o Wald.

cov_type

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

scale

Scale parameter (included only for compatibility issues).

k

Scale parameter (included only for compatibility issues, see drop1).

...

Additional arguments affecting the summary produced.

Details

The hierarchy is respected when considering terms to be dropped from the model: all the main effects present in the interactions are deleted when said effect is deleted from the model.

Value

The function drop1.rasch computes and returns a data.frame containing information regarding the deletion of every term in the object formula.

Author(s)

Fernando Massa, fmassa@iesta.edu.uy

Examples

1
2
3
4
5
6
7
  dif  <- c(-3, -2, -1, 0, 1, 2, 3) 
	n    <- 200
	x1x2 <- cbind(x1 = rnorm(n), x2 = ifelse(runif(n) < 0.5, 0, 1))
	beta <- c(1.2, 0.7)
	X    <- sim_rasch(n = n, delta = dif, reg = x1x2, beta = beta)
  mod  <- raschreg(X, ~ x1 + x2, x1x2)
  drop1(mod)

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