resam.lrts {semisup} | R Documentation |
This function resamples the data,
fits the semi-supervised mixture model,
and returns the likelihood ratio test statistic.
It is called by mixtura
.
resam.lrts(y, z, dist, phi, pi, gamma, test, pass, ...)
y |
observations:
numeric vector of length |
z |
class labels:
integer vector of length |
dist |
distributional assumption:
character |
phi |
dispersion parameter:
positive numeric,
or |
pi |
zero-inflation parameter:
numeric between 0 and 1,
or |
gamma |
offset:
numeric vector of length |
test |
resampling procedure:
character |
pass |
parameters for parametric bootstrap algorithm |
... |
settings |
This function returns a numeric.
This is an internal
function.
The user functions are mixtura
and scrutor
.
# data simulation n <- 100 z <- rep(0:1,each=n/2) y <- rnorm(n=n,mean=2*z,sd=1) z[(n/4):n] <- NA # observed test statistic fit.wrap(y=y,z=z,dist="norm")$lrts # simulated test statistic resam.lrts(y=y,z=z,dist="norm", phi=NULL,pi=NULL,gamma=NULL, test="perm",pass=NULL)