I have a csv file ("data.csv") with several columns. My dependent variable is J and my independent variables are S1, S2, S3 and S4.
J S1 S2 S3 S4 Z
1 4 5 3 2 0
2 12 11 34 44 0
3 12 15 22 21 1
4 10 9 10 11 1
I have managed to plot J and S1:
Reg.data <- read.csv ("C: \\ Users \\ data.csv", header = TRUE, sep = ';')
Library (ggplot2)
Qplot (data = reg.data, x = J, y = mean(S1), color = "red")
Now, I would like to plot (in the same graph) all my independent variables S1, S2, S3, S4 in different colours. I've tried (and I've searched in the forum) but I can not do it.
I would also like to know how to plot three axes: variable J, variables S (on the same axis) and covariable Z.
