Learn R Programming

hopit (version 0.9.0)

standardizeCoef: Standardization of the coefficients

Description

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 Jurges2007;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)Jurges2007hopit.

Usage

standardizeCoef(model, ordered = TRUE, plotf = FALSE,
  plotpval = FALSE, mar = c(15, 4, 1, 1), oma = c(0, 0, 0, 0),
  YLab = "Disability weight", YLab.cex = 1.1, namesf = identity, ...)

standardiseCoef(model, ordered = TRUE, plotf = FALSE, plotpval = FALSE, mar = c(15, 4, 1, 1), oma = c(0, 0, 0, 0), YLab = "Disability weight", YLab.cex = 1.1, namesf = identity, ...)

disabilityWeights(model, ordered = TRUE, plotf = FALSE, plotpval = FALSE, mar = c(15, 4, 1, 1), oma = c(0, 0, 0, 0), YLab = "Disability weight", YLab.cex = 1.1, namesf = identity, ...)

Arguments

model

a fitted hopit model.

ordered

a logical indicating whether to sort the disability weights.

plotf

a logical indicating whether to plot the results.

plotpval

a logical indicating whether to plot the p-values.

mar, oma

graphic parameters, see par.

YLab, YLab.cex

a label of the y-axis and it's size.

namesf

a vector of the names of coefficients or one argument function that modifies the names of coefficients.

...

arguments passed to boxplot.

Value

a vector with standardized coefficients.

References

Jurges2007hopit OKSUZYAN2019hopit

See Also

latentIndex, getCutPoints, getLevels, hopit.

Examples

Run this code
# NOT RUN {
# 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, plotf = TRUE, namesf = txtfun)
sc
# }

Run the code above in your browser using DataLab