Linear Regression Model for Yankees2021 CSV Data

I was curious as to how to make a linear regression model for ball-strike count frequency? I am using release_speed and release_spin_rate as my other two variables but I'm not entirely sure that I have the right code for making a linear regression model for ball-strike count frequency.

fit <- glm(freq_strike ~ release_speed + release_spin_rate, data = YOURDATA, family = "binomial")

thank you sooo much. for YOURDATA what would that be? I'm assuming I would put "yankees"

also, when I plugged it in I got "Error in eval(predvars, data, env) : object 'freq_strike' not found"

Yeah, whatever data frame with those variables that you're working with.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.