enter image description hereI have a numeric dependent variable (drug reports in schools) with three binary categorical predictors – whether schools receive drug training, whether schools receive discipline training, and whether schools have a high or low number of intervention practices. I have made all of these factor variables, and I am now struggling to test the assumptions of my regression analysis. Why is the scatterplot showing vertical lines? Do I need to change my Rcode? I have attached everything below and any help would be great!
FYI my dependent variable (drug) has a skewed distribution, so I did the log transformation.
model <- lm(log_drug ~ practice_hilo + alcohol_drugabuse_f + discipline_policies_f, data = school_safety)
summary(model)
Call:
lm(formula = log_drug ~ practice_hilo + alcohol_drugabuse_f +
discipline_policies_f, data = school_safety)
Residuals:
Min 1Q Median 3Q Max
-1.864 -1.079 -0.273 1.062 4.014
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.37159 0.06750 20.320 <2e-16 ***
practice_hiloLow Value -0.51009 0.05397 -9.451 <2e-16 ***
alcohol_drugabuse_fYes 0.49221 0.05727 8.594 <2e-16 ***
[enter image description here](https://i.sstatic.net/EXbmagZP.png)discipline_policies_fYes -0.09211 0.06485 -1.420 0.156`
Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.323 on 2720 degrees of freedom
Multiple R-squared: 0.07806, Adjusted R-squared: 0.07704
F-statistic: 76.76 on 3 and 2720 DF, p-value: < 2.2e-16
Not sure why my model is showing vertical lines. I have not learned any other types of regression other than linear, so I would like to try and make that work with my data.
Maia Crane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.