# Simulation

## Fun with residuals

Random stuff II: Plotting residuals I was poking around my old teaching files and I found an old file and I wasn’t sure what it was: dat <- read.table("https://raw.githubusercontent.com/flh3/pubdata/main/Stefanski_2007/mizzo_1_data_yx1x5.txt") head(dat) ## V1 V2 V3 V4 V5 V6 ## 1 -0.22391 0.0054599 0.380310 0.0135140 0.209240 0.1467100 ## 2 0.84413 0.1073700 -0.026533 0.0458640 0.012987 -0.0271900 ## 3 1.06240 0.0911160 0.181260 0.0501710 -0.188670 -0.0120820 ## 4 -1.04170 0.4404900 0.245960 0.0054154 -0.212920 0.1015200 ## 5 0.

## Fancy stat terms I

Random stuff: Rademacher distribution A month or two ago, I saw this comic on xkcd: This just shows how folks might use different ways to say the same thing (something simple can appear complex and vice versa). And then, in that same week, I was reading an article that mentioned drawing a random variable from a Rademacher distribution– which was a distribution I had not heard of (w/c has a M = 0, SD = 1) and somehow the name alone made it sound complicated.

## Applied example for alternatives to logistic regression

Introduction Logistic regression is often used to analyze experiments with binary outcomes (e.g., pass vs fail) and binary predictors (e.g., treatment vs control). Although appropriate, there are other possible models that can be run that may provide easier to interpret results. In addition, some of these models may be quicker to run. Some may say that this point is moot given the availability of computing power today but if you’ve ever tried to run a hierarchical generalized linear model with a logit link function and a binary outcome, you know that when using R (using glmer or nlme) this may take quite a long time (and cross your fingers that you don’t have convergence issues).