Learn R Programming

LogisticRCI (version 1.1)

RCI: Calculate the Linear or Logistic Regression-Based Reliable Change Index (RCI)

Description

This function calculates the RCI for lm and binomial glm objects.

Usage

RCI(model)

Arguments

model

An lm or binomial glm object.

Value

The function returns a numeric vector.

Details

This function takes a fitted model object as input and computes either the linear (for lm objects) or logistic (for binomial glm) regression-based reliable change index for each observation.

References

Moral, R.A., Diaz-Orueta, U., Oltra-Cucarella, J. (preprint) Logistic versus linear regression-based Reliable Change Index: implications for clinical studies with diverse sample sizes. DOI: 10.31234/osf.io/gq7az

Examples

Run this code
# NOT RUN {
data(RCI_sample_data)

linear_fit <- lm(score ~ baseline + age + gender + education,
                 data = RCI_sample_data)

logistic_fit <- glm(cbind(score, 15 - score) ~ baseline + age + gender + education,
                    family = binomial,
                    data = RCI_sample_data)

linear_RCI <- RCI(linear_fit)
logistic_RCI <- RCI(logistic_fit)

plot(linear_RCI, logistic_RCI)
# }

Run the code above in your browser using DataLab