df
is data with values from 1-10 for 14 different variables formatted as a dataframe
with n observations with lots of NA values for each variable which is why I couldn't do a regular lm
with multiple predictors.
Then I used an lapply
in order to do a linear regression for each variable because an MLR
returns too many errors
x = lapply(df[,-1], function(x) summary(lm(df$IV ~ x)))
this returns a large list made up of 13 elements that are all lists
is.recursive(x) = TRUE
then I try to use stargazer
stargazer(x)
returns error
Error in .summary.object$coefficients : $ operator is invalid for atomic vectors
how do i get rid of this error?