You are interested in the relationship between the number of ice cream vendors at the beach and the expected number of shark attacks. To examine this relationship, you
collect a random sample of 30 days in a year and record the number of ice cream vendors and shark attacks on that day. You wish estimate the following model:
$Y_i = \alpha + \beta X_i + U_i$
where Y is the number of shark attacks and X is the number of ice cream vendors at the beach.
Suppose you want to estimate this model in R. You open up an R session and load in your data set, which you call shark_data. This data set contains 30 observations of two
variables, \"shark_attacks\" and \"ice_cream_vendors\". The only thing inside of your R environment is the data frame shark_data, and NOTHING ELSE.
Suppose you can only run one line of code to estimate the model. Which of the following lines of code will estimate your linear regression model? Select all that apply.
Im(ice_cream_vendors ~ shark_attacks)
Im(shark_data$ice_cream_vendors ~ shark_data$shark_attacks)
Im(shark_attacks ~ ice_cream_vendors)
Im(shark_attacks ~ ice_cream_vendors, data = shark_data)
Im(shark_attacks = ice_cream_vendors, data = shark_data)
Im(shark_data$shark_attacks ~ shark_data$ice_cream_vendors)
Im(ice_cream_vendors~shark_attacks, data = shark_data)