Hi all,
Trying to create a count of two categorical variables (total cases) for a linear model- dataset looks like below:
var1 weeks
positive week1
positive week1
positive week1
negative week1
positive week2
positive week2
positive week2
positive week3
I want to eventually create a linear regression of positives/ negatives by week, so
model <- lm(weeks ~ totalcases (sum of all var1), data = df)