Type: | Package |
Title: | Linear and Logistic Regression-Based Reliable Change Index |
Version: | 1.1 |
Date: | 2022-03-09 |
Author: | Rafael de Andrade Moral [aut, cre], Unai Diaz-Orueta [aut], Javier Oltra-Cucarella [aut] |
Maintainer: | Rafael de Andrade Moral <rafael.deandrademoral@mu.ie> |
Imports: | methods, graphics, stats, utils |
Suggests: | ggplot2, knitr, rmarkdown, markdown |
VignetteBuilder: | knitr |
Depends: | R (≥ 3.6.0) |
Description: | Here we provide an implementation of the linear and logistic regression-based Reliable Change Index (RCI), to be used with lm and binomial glm model objects, respectively, following Moral et al. https://psyarxiv.com/gq7az/. The RCI function returns a score assumed to be approximately normally distributed, which is helpful to detect patients that may present cognitive decline. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
NeedsCompilation: | no |
Packaged: | 2022-03-09 09:08:39 UTC; rafael |
Repository: | CRAN |
Date/Publication: | 2022-03-09 11:10:02 UTC |
Linear and Logistic Regression-Based Reliable Change Index
Description
Here we provide an implementation of the linear and logistic regression-based Reliable Change Index (RCI), to be used with lm and binomial glm model objects, respectively, following Moral et al. <https://psyarxiv.com/gq7az/>. The RCI function returns a score assumed to be approximately normally distributed, which is helpful to detect patients that may present cognitive decline.
Details
Linear and Logistic Regression-Based Reliable Change Index
Here we provide an implementation of the linear and logistic regression-based Reliable Change Index (RCI), to be used with lm and binomial glm model objects, respectively. The RCI
function returns a score assumed to be approximately normally distributed, which is helpful to detect patients that may present cognitive decline.
Author(s)
Rafael de Andrade Moral [aut, cre], Unai Diaz-Orueta [aut], Javier Oltra-Cucarella [aut]
Maintainer: Rafael de Andrade Moral <rafael.deandrademoral@mu.ie>
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
See Also
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 |
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.
Value
The function returns a numeric vector.
Author(s)
Rafael A. Moral, Unai Diaz-Orueta and Javier Oltra-Cucarella.
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
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)
Calculate the Linear or Logistic Regression-Based Reliable Change Index (RCI) for a New Patient Based on a Fitted Model
Description
This function calculates the RCI for a new patient based on a fitted lm
or binomial glm
model object.
Usage
RCI_newpatient(model, new)
Arguments
model |
An |
new |
A data frame with data for the new patient. |
Details
This function takes a fitted model object and new patient data as input and computes either the linear (for lm
objects) or logistic (for binomial glm
) regression-based reliable change index. The names of the variables in the new patient data have to match the names of the predictors and response variable for the fitted model.
Value
The function returns a numeric vector.
Author(s)
Rafael A. Moral, Unai Diaz-Orueta and Javier Oltra-Cucarella.
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
data(RCI_sample_data)
## fitting models to sample
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)
## new patient data
new_patient <- data.frame("age" = 68,
"gender" = "male",
"score" = 9,
"baseline" = 11,
"education" = 12)
## calculating RCI for new patient without refitting model
RCI_newpatient(model = linear_fit, new = new_patient)
RCI_newpatient(model = logistic_fit, new = new_patient)
Sample Data for RCI Calculation
Description
This dataset is a simulated sample of 100 patients from a study on cognitive decline.
Usage
data("RCI_sample_data")
Format
A data frame with 100 observations on the following 5 variables:
age
The patient's age.
gender
A factor with two levels: "male" or "female".
score
The score obtained after 6 months.
baseline
The score obtained at the start of the study.
education
Number of years of education.
Examples
data(RCI_sample_data)