mixCItwd | R Documentation |
A version of mixCItest
, to be used within pcalg::skeleton
,
pcalg::pc
or pcalg::fci
when the data contain missing values.
Observations where at least one of the variables involved in the test is missing
are deleted prior to performing the test (test-wise deletion).
mixCItwd(x, y, S = NULL, suffStat)
x, y, S |
(Integer) position of variable X, Y and set of variables S,
respectively, in |
suffStat |
|
See mixCItest
for details on the assumptions of the
Conditional Gaussian likelihood ratio test. Test-wise deletion is valid if
missingness does not jointly depend on X and Y.
A p-value.
mixCItest()
for complete data, mixMItest()
for multiply imputed data
## load data (numeric and factor variables) data(toenail2) dat <- toenail2[, -1] ## delete some observations set.seed(123) dat[sample(2000, 20), 1] <- NA dat[sample(2000, 30), 3] <- NA ## analyse data # complete data: ========== mixCItest(1, 2, 4, suffStat=toenail2) # test-wise deletion: ========== mixCItwd(1, 2, 4, suffStat = dat) # list-wise deletion: ========== dat2 <- dat[complete.cases(dat), ] mixCItest(1, 2, 4, suffStat = dat2) ## use mixCItwd within pcalg::pc pc.fit <- pc(suffStat = dat, indepTest = mixCItwd, alpha = 0.01, p = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.