0
$\begingroup$

I'm investigating whether a federal district court judge's ABA rating (rating given to the judge by the American Bar Association when he/she is nominated) correlates to the rate that his/her opinions are reversed on appeal. My data looks like so:

judge aba_rating commission_year cases_tot aff_tot rev_tot rev_rate_tot
Judge1 Well Qualified 2010 272 211 61 0.22426471
Judge2 Not Qualified 2012 279 215 64 0.22939068
Judge3 Qualified 2002 348 287 61 0.17528736
Judge4 Well Qualified 2015 129 97 32 0.24806202
Judge5 Not Qualified 2019 6 6 0 0
... ... ... ... ... ... ...

Here, I believe using ordinary least squares with the simple reversal rate as the outcome would violate basic ordinary least squares assumptions because the variance of the outcome clearly varies based on how many cases the judge has had appealed. (For example, Judge5's reversal rate looks great because he's never been reversed, but he's new to the job and his sample size is so small that I want to weight his reversal rate less.) A weighted regression seems to be the way to go, but I wanted to confirm I am using the weights argument correctly since I am new to R.

Most all the documentation I could find on weights related to heteroscedasticity or having to guess how you think the data should be weighted, and those threads used the inverse-variance as the weight. But I don't think any of that applies here, because we know what the weights should be (reversal rates with more total cases should be weighted more).

I am wondering if the below is the way that I should set it up since I know the weights?

model1 <- lm(rev_rate_tot ~ aba_rating, weights = cases_tot)

I found some information (e.g., here) that would indicate I should do it the following way:

model1 <- lm(rev_rate_tot ~ aba_rating, weights = (1/cases_tot))

I can't tell what's going on under the lm() hood to know if weights = cases_tot or weights = (1/cases_tot) is the way to ensure that the reversal rates of judges who have lots of cases appealed are weighted more than judges with fewer cases appeal.

(I know I could also do this with ANOVA/aov() because I've defined the ABA Ratings as factors, but there are a couple reasons why I don't want to do that right now.)

$\endgroup$
1
  • $\begingroup$ Use a Binomial GLM. $\endgroup$
    – whuber
    Commented Feb 2, 2021 at 10:22

1 Answer 1

1
$\begingroup$

Your response variable, rev_rate_tot is not suitable for OLS, since it is bounded between zero and one and OLS assumes a variable in the real line. There are a few options for you, but the one I am going to dive into is a binomial GLM, as suggested by @whuber in the comments. More precisely in your case, a grouped binomial GLM, since you have your "trials", the cases, already grouped by Judge.

Note that if you had case-specific variables you wanted to control for, you'd have to ungroup the data and work with an ungrouped binomial GLM, also known as logistic regression if you choose the canonical link.

To adjust the binomial GLM in base-R with your data, you have 2 options:

model1 <- glm(rev_rate_tot ~ aba_rating, weights = cases_tot, family='binomial')
model1 <- glm(cbind(aff_tot, rev_tot) ~ aba_rating, family='binomial')

They should give you identical results.

$\endgroup$
2
  • $\begingroup$ Thank you! Should I also specify the family as family = binomial? $\endgroup$
    – davidw2
    Commented Mar 6, 2021 at 18:23
  • $\begingroup$ a yes! sorry, forgot to add the family! $\endgroup$ Commented Mar 8, 2021 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.