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

The estimated Monte Carlo mean and variance of the average change in clinical attachment level (CAL) for each subject

1 | ```
MC_var_yibar_mis(mu, Sigma, sigma1, lambda, nu, sigma0, Num, a0, b0, cutoff)
``` |

`mu` |
Mean matrix, where row represents each treatment path, and column represents each cluster unit |

`Sigma` |
Within-mouth teeth covariance matrix |

`sigma1` |
Standard deviation of the residual for the continuous outcome |

`lambda` |
The skewness parameter of the residual for the continuous outcome |

`nu` |
The degree freedom, or kurtosis parameter of the residual for the continuous outcome |

`sigma0` |
Standard deviation of the residual for the binary outcome |

`Num` |
Number of samples to estimate mean or variance of |

`a0` |
Intercept parameter in the probit model for the binary outcome |

`b0` |
Slope parameter corresponding to the spatial random effect in the probit model for the binary outcome |

`cutoff` |
Cut-off value in the binary outcome regression |

*MC_var_yibar_mis* computes the Monte-Carlo estimates of expectation and variance of the sample mean among the teeth within each mouth, i.e
*\bar{Y}_i = ∑ Y_{it}(1 - M_{it})/∑(1 - M_{it})*, where *Y_{it}* is the change in CAL (measured in mm) for patient *i* and tooth *t*, and *M_{it}*
is the misingness indicator, i.e., *M_{it} = 1* implies tooth *t* in subject *i* is mising. The joint regression models for *Y_{it}* and *M_{it}*
are available in Reich & Bandyopadhyay (2010, *Annals of Applied Statistics*).

The simulated dataset of CAL change "*Y_{it}*", missingness "*M_{it}*" and function inside the indicator of "*M_{it} I_{it}*" for
each tooth of each patient, with the corresponding estimated mean "*mY_i*", variance "*VarY_i*" and missing proportion "PM" for each patient

Jing Xu, Dipankar Bandyopadhyay, Douglas Azevedo, Bibhas Chakraborty

Besag, J., York, J. & Mollie, A. (1991), *"Bayesian image restoration, with two applications in spatial statistics
(With Discussion)"*, Annals of the Institute of Statistical Mathematics 43, 159.

Reich, B. & Bandyopadhyay, D. (2010), *"A latent factor model for spatial data with informative missingness"*,
The Annals of Applied Statistics 4, 439–459.

CAR_cov_teeth, SampleSize_SMARTp

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ```
m <- 28
Num <- 1000
cutoff <- 0
sigma1 <- 0.95
sigma0 <- 1
lambda <- 0
nu <- Inf
b0 <- 0.5
a0 <- -1.0
rho <- 0.975
tau <- 0.85
del1 <- 0.5
del2 <- 2
Sigma <- CAR_cov_teeth(m, rho, tau)
Sigma_comp <- array(Sigma, c(m, m, 4))
Sigma_sim <- array(Sigma, c(m, m, 10))
mu_comp <- array(0, c(2, m, 2))
mu_comp[, , 1] <- rbind(rep(0, m), rep(del1, m))
mu_comp[, , 2] <- rbind(rep(0, m), rep(del2, m))
VarYitd1R = MC_var_yibar_mis(mu = mu_comp[1, , 1], Sigma = Sigma,
sigma1 = sigma1,
lambda = lambda, nu = nu,
sigma0 = sigma0, Num = Num, a0 = a0, b0 = b0,
cutoff = cutoff)
PM <- VarYitd1R$PM
VarYid1R <- VarYitd1R$VarYi
mYid1R <- VarYitd1R$mYi
VarYitd1NR <- MC_var_yibar_mis(mu = mu_comp[2, , 1], Sigma = Sigma,
sigma1 = sigma1,
lambda = lambda, nu = nu,
sigma0 = sigma0, Num = Num, a0 = a0, b0 = b0, cutoff = cutoff)
PM <- VarYitd1NR$PM
VarYid1NR <- VarYitd1NR$VarYi
mYid1NR <- VarYitd1NR$mYi
VarYitd3R <- MC_var_yibar_mis(mu = mu_comp[1, , 2], Sigma = Sigma,
sigma1 = sigma1,
lambda = lambda, nu = nu,
sigma0 = sigma0, Num = Num, a0 = a0, b0 = b0,
cutoff = cutoff)
PM <- VarYitd3R$PM
VarYid3R <- VarYitd3R$VarYi
mYid3R <- VarYitd3R$mYi
VarYitd3NR <- MC_var_yibar_mis(mu = mu_comp[2,,2], Sigma = Sigma,
sigma1 = sigma1,
lambda = lambda, nu = nu,
sigma0 = sigma0, Num = Num, a0 = a0, b0 = b0, cutoff = cutoff)
PM <- VarYitd3NR$PM
VarYid3NR <- VarYitd3NR$VarYi
mYid3NR <- VarYitd3NR$mYi
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.