CODE 4 : Regression mode
Regression model.
1. Write code in RStudio program.
1) In
line1 names(mtcars) is Call the variable
names in "mtcars".
2) in
line6 (“psych”) is a package which we are install before and we can call the
psych in line7.
3) y =
a+ bx; a = constant and b = slope
y
is mpg because we want to predict mpg
x is the variable that we believe it can
explain the variable of mpg
4) line30
is build the regression model ( lm : linear model ).
2. When you write code on
rstudio program finish, click Run or Ctrl+R
but it is run all.
3. This data are run program
the following command to write code on console part.
4. This is data and value
which happens on environment part.
5. This part show more
function ex.plots, packages, files, etc. From the above command there are hist
command, it be histogram show the relation between two values.
6. From the above command
there are plot command, it be slope are significant and plot to distribution of
datas.
7. This page is overall of
RStudio program when you are run program.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น