quadp: This function provides you the pvalue based on the Pearson...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Main function of this package. It returns the pvalue of the quadratic form statistics.

Usage

1
quadp(y, A, mycoef)

Arguments

y

y is the vector in quadratic form y^T A y

A

A is the symmetric matrix

mycoef

global variables

Details

This is the main function in the package. It returns the test statistics of the quadratic form and its corresponding p value using Pearson family for the fitting.

Value

stat

test statistics value

p

pvalue based on the Pearson family fitting using the exact four moments

Author(s)

Yi-Hui Zhou: yihui_zhou@ncsu.edu

See Also

lincombfun, sumfun

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#####  m is the dimension of the A matrix, n is the length of y        ##
#####  no row/column of A can be all constant, as this is degenerate and creates problems. 
library(PearsonDS)

m=15
n=20
set.seed(1)
x=matrix(rnorm(m*n),m,n) # just an example
y=rnorm(n)     
A=t(x-rowMeans(x))
data(mycoef)
##### The code below assumes that y and A have been presepecified or otherwise preloaded
#result=quadp(y,A,mycoef)
#print(result)


Search within the quad package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.