Los métodos más aplicados para evaluar dependencia.
x<-rnorm(100,75,25)
y<-5+0.4*x+rnorm(100,0,5)
plot(x,y)
x<-c(0,1)
y<-c(0,5)
plot(x,y,type='l',col='blue')
Linear model function
\[ H_0: \beta_1=0 \]
\[ H_a: \beta_1 \neq 0 \]
\[ Y_i = \beta_0 + \beta_1*x_i + \epsilon_i \]
x<-rnorm(100,75,25)
y<-5+0.4*x+rnorm(100,0,5)
mod<-lm(y~x)
summary(mod)
##
## Call:
## lm(formula = y ~ x)
##
## Residuals:
## Min 1Q Median 3Q Max
## -11.5260 -3.3659 -0.0298 2.7550 12.3449
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.73547 1.77812 0.414 0.68
## x 0.45443 0.02119 21.448 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.499 on 98 degrees of freedom
## Multiple R-squared: 0.8244, Adjusted R-squared: 0.8226
## F-statistic: 460 on 1 and 98 DF, p-value: < 2.2e-16
Se rechaza H0 es decir hay dependencial lineal creciente.