I would like to run a linear regression between two columns in a dataset: Column V45 and Column TotalScore.
In response to a previous question I have converted both columns to 'numeric' values. However, I need to omit any cells in the Total Score column which contain the value '0'.
In total there are approximately 1450 rows.
The code I'm attempting to use is as follows:
reg_ex1 <- lm(V45~TotalScore,data = Combineddatainprogresscsv)
But it doesn't provide any output.
I basically need to omit all of the rows which have a value of '0' in the column 'Total Score'. Can I do something like: if cell in column total score contains 0, omit this entire row from the regression?
Thank you for any help!