PRMtest: Conduct estimation and QMS test for paired repeated measures...

Description Usage Arguments Value References Examples

Description

The problem can be reduced to a mixed effects model estimation under a quadratic constraint. Due to the special structure of the mixed effects model for the PRM designs, we can compute the likelihood analytically and hence efficiently calculate MLE/REML. See the reference of Bai et. al (2018). The score and Wald Z-tests are also implemented. This function works for balanced designs.

Usage

1
PRMtest(X, rho, REML = TRUE)

Arguments

X

n by m matrix of paired measures

rho

null threshold of acceptable RMS value

REML

using REML instead of MLE. Default to TRUE.

Value

p.value

test p-values for: QMS test, score Z-test, Wald Z-test

pars

estimated null parameter values

References

Bai,Y., Wang,Z., Lystig,T.C., and Wu,B. (2018) Statistical test with sample size and power calculation for paired repeated measures designs of method comparison studies.

Examples

1
2
3
4
5
6
n=20; m=20; s2w=4.44; s2b=1.2; mu0=0.94
e = matrix(rnorm(n*m), n,m)*sqrt(s2w)
u = rnorm(n)*sqrt(s2b)
X = mu0 + u + e
PRMtest(X,3)
PRMtest(X, sqrt(s2w+s2b+mu0^2))

baolinwu/SPprm documentation built on May 9, 2019, 8:41 a.m.