View source: R/plot_principal.R
CalPS | R Documentation |
Calculate the proportion of each principal stratum (R).
CalPS(
p.r.mcmc,
name.group = c("Overall", "Female", "Male", "Non-white\nMale", "White\nMale")
)
p.r.mcmc |
P.R.mcmc array generated from |
name.group |
A character vector including the labels of five subgroups. |
A data.frame
of the proportion of each principal stratum.
data(synth)
sample_mcmc <- AiEvalmcmc(data = synth, n.mcmc = 10)
subgroup_synth <- list(
1:nrow(synth), which(synth$Sex == 0), which(synth$Sex == 1),
which(synth$Sex == 1 & synth$White == 0), which(synth$Sex == 1 & synth$White == 1)
)
sample_apce <- CalAPCE(
data = synth, mcmc.re = sample_mcmc,
subgroup = subgroup_synth
)
CalPS(sample_apce[["P.R.mcmc"]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.