# Articles by R on I Should Be Writing: COVID-19 Edition

### Testing The Equality of Regression Coefficients

February 15, 2021 |

The Problem Method 1: As Model Comparisons Method 2: Paternoster et al (1998) Method 3: emmeans \beta_{\text{n_comps}}\). Method 2: Paternoster et al (1998) According to Paternoster et al. (1998), we can compute a t-test to compare the coefficients:
bs <- coef(m)[-1]
V <- vcov(m)[-1, -1]

tibble::tibble(
diff_estim = diff(bs),
diff_SE = sqrt(V[1, 1] + V[2, 2] - 2 * V[1, 2]),
t_stat = diff_estim / diff_SE,
df = df.residual(m),
p_value = 2 * pt(abs(t_stat), df = df, lower.tail = FALSE)
)
#> # A tibble: 1 x 5
#>   diff_estim diff_SE t_stat    df  p_value
#>        <dbl>   <dbl>  <dbl> <int>    <dbl>
#> 1     -0.402  0.0251  -16.0   497 6.96e-47
This gives the exact same results as the first method! ($$t^2 = (-16)^2 = 256$$ is the ... [Read more...]

### (What to do) When Predictors Co-Vary

August 10, 2020 |

Co-varying predictors can be a messy business. They make estimates unstable, reducing our statistical power and making interpretation more difficult. In this post I will demonstrate how ignoring the presence of co-variation between predictors when exploring our models can lead to odd results and how we might deal with this ...

### (What to do) When Predictors Co-Vary

August 10, 2020 |

Co-varying predictors can be a messy business. They make estimates unstable, reducing our statistical power and making interpretation more difficult. In this post I will demonstrate how ignoring the presence of co-variation between predictors when exploring our models can lead to odd results and how we might deal with this ...

### Estimating and testing GLMs with emmeans

April 12, 2020 |

This post was written in collaboration with Almog Simchon (@almogsi) and Shachar Hochman (@HochmanShachar). Go follow them. The fictional simplicity of Generalized Linear Models Who doesn’t love GLMs? The ingenious idea of taking a response level variable (e.g. binary or count) and getting some link function magic to ...

### Estimating and testing GLMs with emmeans

April 12, 2020 |

This post was written in collaboration with Almog Simchon (@almogsi) and Shachar Hochman (@HochmanShachar). Go follow them. The fictional simplicity of Generalized Linear Models Who doesn’t love GLMs? The ingenious idea of taking a response level ...

### The Mysterious Case of the Ghost Interaction

October 29, 2019 |

This spooky post was written in collaboration with Yoav Kessler (@yoav_kessler) and Naama Yavor (@namivor).. Experimental psychology is moving away from repeated-measures-ANOVAs, and towards linear mixed models (LMM1). LMMs have many advantages over rmANOVA, including (but not limited to): Analysis of single trial data (as opposed to aggregated means ...

### (Bootstrapping) Follow-Up Contrasts for Within-Subject ANOVAs (part 2)

August 13, 2019 |

1. Fit your repeated-measures model with lmer 2. Define the contrast(s) of interest 3. Run the bootstrap Summary A while back I wrote a post demonstrating how to bootstrap follow-up contrasts for repeated-measure ANOVAs for cases where you data ...

### Signal Detection Theory vs. Logistic Regression

July 28, 2019 |

I recently came across a paper that explained the equality between the parameters of signal detection theory (SDT) and the parameters of logistic regression in which the state (“absent”/“present”) is used to predict the response (“yes”/“no”, but also applicable in scale-rating designs) (DeCarlo, 1998). Here is a short simulation-proof ...