Learn R Programming

SIMPLE.REGRESSION (version 0.2.3)

data_Halvorson_2022_log: data_Halvorson_2022_log

Description

Logistic regression data from Halvorson et al. (2022, p. 291).

Usage

data(data_Halvorson_2022_log)

Arguments

Examples

Run this code
head(data_Halvorson_2022_log)
# \donttest{
log_Halvorson <-
  LOGISTIC_REGRESSION(data=data_Halvorson_2022_log, DV='Y', forced=c('x1','x2'), 
                      plot_type = 'diagnostics')

# high & low values for x2
x2_high <- mean(data_Halvorson_2022_log$x1) + sd(data_Halvorson_2022_log$x1)
x2_low  <- mean(data_Halvorson_2022_log$x1) - sd(data_Halvorson_2022_log$x1)

PLOT_MODEL(model = log_Halvorson, 
           IV_focal_1 = 'x1',   
           IV_focal_2 = 'x2',  IV_focal_2_values = c(x2_low, x2_high),
           bootstrap=FALSE, N_sims=1000, CI_level=95, 
           ylim = c(0, 1), 
           xlab = 'x1',
           ylab = 'Expected Probability', 
           title = 'Probability of Y by x1 and x2 for Simulated Data Example') 
 
# }

Run the code above in your browser using DataLab