standardizeCoef | R Documentation |
Calculate standardized the coefficients (e.g. disability weights for the health variables) using
the predicted latent measure obtained from the model.
In the self-rated health example the standardized coefficients are called disability weights \insertCiteJurges2007;textualhopit
and are calculated for each health variable to provide information about the impact of a specific health measure on the latent index
(see latentIndex
). The disability weight for a health variable is equal to the ratio of the corresponding health coefficient
and the difference between the lowest and the highest values of the predicted latent health. In other words, the disability weight reduces
the latent index by some given amount or percentage (i.e., the latent index of every individual is reduced by the same amount if the person had a heart attack or other
heart problems)\insertCiteJurges2007hopit.
standardizeCoef(model, namesf = identity) standardiseCoef(model, namesf = identity) disabilityWeights(model, namesf = identity)
model |
a fitted |
namesf |
a vector of the names of coefficients or one argument function that modifies the names of coefficients. |
a vector with standardized coefficients.
Maciej J. Danko
Jurges2007hopit
\insertRefOKSUZYAN2019hopit
latentIndex
, getCutPoints
, getLevels
, hopit
.
# DATA data(healthsurvey) # the order of response levels decreases from the best health to # the worst health; hence the hopit() parameter decreasing.levels # is set to TRUE levels(healthsurvey$health) # Example 1 --------------------- # fit a model model1 <- hopit(latent.formula = health ~ hypertension + high_cholesterol + heart_attack_or_stroke + poor_mobility + very_poor_grip + depression + respiratory_problems + IADL_problems + obese + diabetes + other_diseases, thresh.formula = ~ sex + ageclass + country, decreasing.levels = TRUE, control = list(trace = FALSE), data = healthsurvey) # a function that modifies the coefficient names. txtfun <- function(x) gsub('_',' ',substr(x,1,nchar(x)-3)) # calculate and plot the disability weights sc <- standardizeCoef(model1, namesf = txtfun) sc summary(sc) plot(sc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.