scoretest: Score test

View source: R/test.R

scoretestR Documentation

Score test

Description

Score test, also knowned as Lagrange multiplier tests

Usage

scoretest(object, ...)

## Default S3 method:
scoretest(object, ...)

## S3 method for class 'micsr'
scoretest(object, ..., vcov = NULL)

Arguments

object

the first model,

...

for the micsr method, it should be the formula for the "large" model or an object from which a formula can be extracted

vcov

an optional covariance matrix

Value

an object of class "htest".

Author(s)

Yves Croissant

Examples

mode_choice <- transform(mode_choice, cost = cost * 8.42)
mode_choice <- transform(mode_choice, gcost = (ivtime + ovtime) * 8 + cost)
pbt_unconst <- binomreg(mode ~ cost + ivtime + ovtime, data = mode_choice, link = "probit")
pbt_const <- binomreg(mode ~ gcost, data = mode_choice, link = "logit")
scoretest(pbt_const , . ~ . + ivtime + ovtime)

micsr documentation built on June 8, 2025, 9:31 p.m.