lsdtest: Multivariate Left Spherically Distributed (LSD) linear scores...

Description Usage Arguments Value Author(s) References Examples

Description

It performs the multivariate Left Spherically Distributed linear scores test of L\"auter et al. (The Annals of Statistics, 1998) (see also details below).

Usage

1
lsd.test(resp, alternative = 1, null = NULL, D = NULL, data=NULL)

Arguments

resp

The response vector of the regression model. May be supplied as a vector or as a formula object. In the latter case, the right hand side of Y is passed on to alternative if that argument is missing, or otherwise to null.

alternative

The part of the design matrix corresponding to the alternative hypothesis. The covariates of the null model do not have to be supplied again here. May be given as a half formula object (e.g. ~a+b). In that case the intercept is always suppressed.

null

The part of the design matrix corresponding to the null hypothesis. May be given as a design matrix or as a half formula object (e.g. ~a+b). The default for Z is ~1, i.e. only an intercept. This intercept may be suppressed, if desired, with Z = ~0.

data

Only used when Y, X, or Z is given in formula form. An optional data frame, list or environment containing the variables used in the formulae. If the variables in a formula are not found in data, the variables are taken from environment(formula), typically the environment from which gt is called.

D

is q x p matrix or it is a function with arguments resp and null returning the q x p transformation matrix. When D = NULL, then D = diag(t(resp)%*%IP0%*%resp) with IP0 = diag(n) - null%*%solve(t(null)%*%null)%*%t(null)

Value

The function returns an object of class lsd.object.

F

the test statistic

df

the degrees of freedom of F

p

the associated p-value

D

the matrix used in the test (it provide information on the influence of columns in resp to the test)

call:

The matched call to lsd.test.

Author(s)

Livio Finos

References

J. Laeuter, E. Glimm and S. Kropf (1998) Multivariate test based on Left-Spherically Distributed Linear Scores. The Annals of Statistics, Vol. 26, No. 5, 1972-1988

L. Finos (2011). A note on Left-Spherically Distributed Test with covariates, Statistics and Probabilty Letters, Volume 81, Issue 6, June 2011, Pages 639-641

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(1)
#Standard multivariate LSD test for one sample case
X=matrix(rnorm(50),5,10)+2
lsd.test(resp=X,alternative=~1)

#Standard multivariate LSD test for two sample case
X2=X+matrix(c(0,0,1,1,1),5,10)*10
lsd.test(resp=X2,null=~1,alternative=c(0,0,1,1,1))

#General multivariate LSD test for linear predictor with covariates
lsd.test(resp=X2,null=cbind(rep(1,5),c(0,0,1,1,1)),alternative=1:5)

someMTP documentation built on March 1, 2021, 9:06 a.m.