Title: | Streamlined Integration of Regression Assumption |
---|---|
Description: | It streamlines the evaluation of regression model assumptions, enhancing result reliability. With integrated tools for assessing key aspects like linearity, homoscedasticity, and more. It's a valuable asset for researchers and analysts working with regression models. |
Authors: | Nicolás Rubio García [aut, cre] |
Maintainer: | Nicolás Rubio García <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.0.0 |
Built: | 2024-10-29 03:46:22 UTC |
Source: | https://github.com/nrubiog/regassure |
This function verifies assumptions for various linear regression models, including OLS, WLS, censored, and trunmessageed models.
check_lm_assumptions( model, studentize = TRUE, iterations = 1000, exact = NULL, simulate.p.value = FALSE, B = 2000, simulate = TRUE )
check_lm_assumptions( model, studentize = TRUE, iterations = 1000, exact = NULL, simulate.p.value = FALSE, B = 2000, simulate = TRUE )
model |
Object of class 'lm'. The fitted linear regression model. |
studentize |
Argument of bptest function. Default is TRUE. |
iterations |
Argument of dwtest function. Default is 1000. |
exact |
Argument of ks.test function. Default is NULL. |
simulate.p.value |
Argument of ks.test function. Default is FALSE. |
B |
Argument of ks.test function. Default is 2000. |
simulate |
Argument of durbinWatsonTest function. Default is TRUE. |
A list containing the results of assumption checks.
This function performs assumption checks for logistic regression models, including binary, multinomial, and ordered models. It conducts various tests to assess the validity of the model assumptions.
check_logit( logit_model, data, tipo_modelo, vars_numericas = NULL, y = NULL, auc = NULL, ci = NULL, ret = NULL )
check_logit( logit_model, data, tipo_modelo, vars_numericas = NULL, y = NULL, auc = NULL, ci = NULL, ret = NULL )
logit_model |
Fitted logistic regression model. |
data |
dataframe containing predictor variables. |
tipo_modelo |
Type of logistic regression model: ("binario", "multinomial", "ordenado", "binary", "multinomial", "ordered", "ordinal") |
vars_numericas |
Numeric variables to be used in Box-Tidwell test. Default is NULL. |
y |
Response variable for ROC test. Default is NULL. |
auc |
roc function argument. |
ci |
roc function argument. |
ret |
roc function argument. |
A list containing the results of assumption checks.
This function generates predictions from a model and calculates the errors between actual and predicted values, resulting in a dataframe containing the predicted values, actual values, and the residuals.
get_predict(modelo, datos, real, n = NULL)
get_predict(modelo, datos, real, n = NULL)
modelo |
Fitted model object |
datos |
Data frame containing predictor variables. |
real |
Vector of actual response values. |
n |
Number of digits to round the columns. Default |
A data frame containing actual, predicted, and error values.