plm_equiv_test {comets}R Documentation

Equivalence test for the parameter in a partially linear model

Description

Equivalence test for the parameter in a partially linear model

Usage

plm_equiv_test(Y, X, Z, from, to, scale = c("plm", "cov", "cor"), ...)

Arguments

Y

Vector or matrix of response values.

X

Matrix or data.frame of covariates.

Z

Matrix or data.frame of covariates.

from

Lower bound of the equivalence margin

to

Upper bound of the equivalence margin

scale

Scale on which to specify the equivalence margin. Default "plm" corresponds to the partially linear model parameter described in the details. "cov" corresponds to the conditional covariance and "cor" to conditional correlation which lies in [-1, 1].

...

Further arguments passed to gcm

Details

The partially linear model postulates

Y = X \theta + g(Z) + \epsilon,

and the target of inference is theta. The target is closely related to the conditional covariance between Y and X given Z:

\theta = E[cov(X, Y | Z)] / E[Var(X | Z)].

The equivalence test (based on the GCM test) tests H_0: \theta \not\in [{\tt from}, {\tt to}] versus H_1: \theta \in [{\tt from}, {\tt to}]. Y, X (and theta) can only be one-dimensional. There are no restrictions on Z. The equivalence test can also be performed on the conditional covariance scale directly (using scale = "cov") or on the conditional correlation scale:

E[cox(X, Y | Z)] / \sqrt{E[Var(X | Z)]E[Var(Y | Z)]}

, using scale = "cor".

Value

Object of class 'gcm' and 'htest'

Examples

n <- 150
X <- rnorm(n)
Z <- matrix(rnorm(2 * n), ncol = 2)
colnames(Z) <- c("Z1", "Z2")
Y <- X^2 + Z[, 2] + rnorm(n)
plm_equiv_test(Y, X, Z, from = -1, to = 1)

[Package comets version 0.0-2 Index]