hinge.test {chngpt}R Documentation

A non-nested hypothesis testing problem for threshold regression models

Description

Test a hinge effect against a linear effect

Usage

hinge.test(formula, cov.interest, family = c("binomial", "gaussian"), data, thres = NA,
    lb.quantile = 0.1, ub.quantile = 0.9, chngpts.cnt = 10, method = c("FDB", "B", "DB"),
    boot.B = 10000, B2 = NA, verbose = FALSE)

Arguments

formula

formula

cov.interest

cov.interest

family

family

data

data

thres

If supplied, this will be the threshold value to use in the hinge model.

lb.quantile

lower bound of threshold candidates in quantile

ub.quantile

upper bound of threshold candidates in quantile

chngpts.cnt

number of candidate thresholds

method

type of test. FDB: false double bootstrap, B: parametric bootstrap, DB: double bootstrap.

boot.B

number of parametric bootstrap replicates for B and FDB

B2

number of inner bootstrap replicates for DB

verbose

verbose

Value

A list of class htest

p.value

P-value

chngpts

Vector of change points evaluated

TT

Standardized absolute score statistics

V.S.hat

Estimated variance-covariance matrix of the score statistics

Author(s)

Zonglin He

References

He, Fong, Fouda, Permar. A non-nested hypothesis testing problem for threshold regression model, under review

Examples


dat=sim.hinge(threshold.type = 'NA',family = 'binomial',thres='NA',X.ditr = 'norm',mu.X = c(0,0,0),
    coef.X = c(0,.5,.5,.4),cov.X = diag(3),eps.sd = 1,seed = 1,n=100)
test=hinge.test(Y~X1+X2, "x", family="binomial", data=dat,'method'='FDB',boot.B=10)
test


[Package chngpt version 2023.11-29 Index]