Bayes_ord | R Documentation |
Bayesian ordinal regression based on cumulative likelihood function Estimate the correlation coefficients of treatment variable, with or without the proportional odds assumption
Bayes_ord(formula, data, structure, U)
formula |
a formula expression as for regression models, of the form response ~ predictors. The response should be a factor (preferably an ordered factor), which will be interpreted as an ordinal response with levels ordered as in the factor. |
data |
a data frame in which to interpret the variables occurring in the formula. |
structure |
the data structure. i.e., structure = "PO" or structure = "NPO". |
U |
the desirability of each outcome level |
This function estimates the coefficients and threshold coefficients. Specifically, the numerical utilities U reflect the desirability of each outcome level. To do this, in our example, we first set U[1] = 100 and U[5] = 0, and then asked physicians to specify numerical values for the intermediate levels, that reflect their desirability relative to the best and worst levels.
Bayes_ord() returns the regression coefficients, including: (1) estimator coefficients (2) thresholds coefficients
### Example One: PO data structure fm1 = Bayes_ord(response~treatment, example.data, "PO") ### Example Two: NPO data structure fm2 = Bayes_ord(response~treatment, example.data, "NPO", U = c(100,80,65,25,10,0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.