Here we’re checking the sparse-matrix version of
pQF
on a really unsuitably small example with 67 markers,
because it’s the one that comes with the SKAT
package: see
help(SKAT)
## Loading required package: Matrix
## Loading required package: SPAtest
## Loading required package: RSpectra
First example: continuous phenotype, no adjustment
data(SKAT.example)
attach(SKAT.example) #look, it's not my fault, that's how they did it.
obj<-SKAT_Null_Model(y.c ~ 1, out_type="C")
skat.out1<-SKAT(Z, obj)
skat.qf1a<-SKAT.matrixfree(Z)
skat.qf1b<-SKAT.matrixfree(Z,model=lm(y.c~1))
skat.qf1c<-SKAT.matrixfree(Z,model=glm(y.c~1))
skat.out1$Q
## [,1]
## [1,] 234803.8
## [,1]
## [1,] 234803.8
## [1] 234803.8
## [1] 234803.8
## [1] 0.01874576
## [,1]
## [1,] 0.01874576
## Warning in pchisqsum(x, c(rep(1, n), nu), c(ee, scale), method = method, :
## Negative/fractional df removed
## [,1]
## [1,] 0.01874551
## Warning in pchisqsum(x, c(rep(1, n), nu), c(ee, scale), method = method, :
## Negative/fractional df removed
## [,1]
## [1,] 0.01874551
The warning indicates the remainder term in the approximation has
been dropped, which is appropriate. If you don’t specify
convolution.method
the default is the saddlepoint
approximation – the impact is in the third decimal place.
And more systematically