Description Usage Arguments Value
View source: R/premium_wrapper.R
Wrapper function to fit profile regression model from package PReMiuM
1 2 3 4 5 6 7 8 9 10 11 12 | premium_wrapper(
niter,
nburn,
Y,
X,
W,
scaleY = FALSE,
varSelectType = "None",
simnum = NULL,
priors,
seed = NULL
)
|
niter |
number of iterations through sampler |
nburn |
number of burn-in iterations |
Y |
response data |
X |
exposure data |
W |
covariate data |
scaleY |
logical; if TRUE response is centered and scaled before model fit |
varSelectType |
type of variable selection to be used: "None" or "BinaryCluster", default is "None" |
simnum |
number of output file (.txt files will be saved in the file path paste0("Premium_output/output",simnum) |
priors |
prior hyperparameters |
seed |
random number seed |
list with components
fit: model fit, an object of type "runInfoObj". See profRegr documentation in R package PReMiuM
risk: mean risk for each subject
rho: posterior distribution of probability of inclusion for each exposure
risk.summary: mean, SD, and 0.95 CI of cluster-intercept (risk) for each subject
exposure.response: cluster means, SD, 0.95 CI, and size, plus mean/SD of repsonse for subjects in each cluster
fitted vals: fitted values for each subject
clusters: vector of most optimal clustering
cluster.summary: array of empirical mean and SD of exposures for individuals assigned to each cluster
risk distn: distribution of model-averaged cluster-intercepts for each cluster in the best clustering
groupList: list of which subjects are in which group in the most optimal clustering
riskProfileObj: object of type "riskProfileObj". See PReMiuM documentation for function "calcAvgRiskAndProfile"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.