Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
jcruet_bi variate regression model
#X data x <- c(20, 16, 19.79999924, 18.39999962, 17.10000038, 15.5, 14.69999981, 17.10000038, 15.39999962, 16.20000076, 15, 17.20000076, 16, 17, 14.39999962) #Y data y <- c(88.59999847, 71.59999847, 93.30000305, 84.30000305, 80.59999847, 75.19999695, 69.69999695, 82, 69.40000153, 83.30000305, 79.59999847, 82.59999847, 80.59999847, 83.5, 76.30000305) #mean mean(x) #mean mean(y) #variance var(x) #variance var(y) #standard deviation sd(x) #standard deviation sd(y) #sum of sd x and y sum (sd(x+y)) #sum of squared deviation (sd(x)+sd(y)) #corelation of x and y cor(x,y) #covariance of x and y cov(x,y) #interpret correlation #My correlation is closer to positive 1, near perfect correlation. reg <- lm(y ~ x) summary(reg) # sqrt(sum(reg$residuals**2)/3) # reg$fitted.values # plot(density(reg$residuals)) # 1 - sum(reg$residuals**2) / sum((y-mean(y))^2) #R^2 statistic, 70% of the variation is explained by the model. #Data point will fall 60% from the regression model. #The F statistic is associated with the p value of .0001067 #plot plot (x,y)
run
|
edit
|
history
|
help
0
For loops Example
oooo
Ejercicios R
absolute.R
17-08-2020SitemaEqLin
data framing 2
Predict the prices
Snowflake curve
rungeefeito
Análise de Variâncias DIC e teste de Tukey 1