Learn R Programming

hopit (version 0.9.0)

getCutPoints: Calculate the threshold cut-points and individual adjusted responses using Jurges' method

Description

Calculate the threshold cut-points and individual adjusted responses using Jurges' method

Usage

getCutPoints(model, decreasing.levels = TRUE, subset = NULL,
  plotf = TRUE, mar = c(4, 4, 1, 1), oma = c(0, 0, 0, 0),
  XLab = "Health index", XLab.cex = 1.1, YLab = "Counts",
  YLab.cex = 1.1, group.labels.type = c("middle", "border", "none"))

Arguments

model

a fitted hopit model.

decreasing.levels

a logical indicating whether self-reported health classes are ordered in decreasing order.

subset

an optional vector specifying a subset of observations.

plotf

a logical indicating whether to plot the results.

mar, oma

graphic parameters, see par.

XLab, XLab.cex

a label of the x axis and it's size.

YLab, YLab.cex

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

group.labels.type

position of the legend. One of middel, border, or none.

Value

a list with the following components:

cutpoints

cut-points for the adjusted categorical response levels with the corresponding percentiles of the latent index.

adjusted.levels

adjusted categorical response levels for each individual.

References

Jurges2007hopit OKSUZYAN2019hopit

See Also

latentIndex, standardiseCoef, 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)

# calculate the health index cut-points
z <- getCutPoints(model = model1)
z$cutpoints

# tabulate the adjusted health levels for individuals: Jurges method
rev(table(z$adjusted.levels))

# tabulate the original health levels for individuals
table(model1$y_i)

# tabulate the predicted health levels
table(model1$Ey_i)
# }

Run the code above in your browser using DataLab