Documente Academic
Documente Profesional
Documente Cultură
Call:
lm(formula = Infarto ~ 1, data = infarto)
Residuals:
Min 1Q Median 3Q Max
-0.84 0.16 0.16 0.16 0.16
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.84000 0.03685 22.8 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
RLM.COMPLETO<-lm(formula = Infarto~.,infarto)
> summary(RLM.COMPLETO)
RLM.Stepwise<-step(RLM.Vacio,scope = list(lower=RLM.Vacio,upper=RLM.COMPL
ETO),direction = "both")
Start: AIC=-198.69
Infarto ~ 1
Step: AIC=-Inf
Infarto ~ Colesterol
Observacion:
Calculo de p:
> 1-pchisq(13.44,1)
[1] 0.0002463156 = p
Stepwise
> Ajuste.Estudio.0<-glm(Infarto~1,family=binomial,data=infarto)
> lower=Infarto~1
> upper=Infarto~Edad+Colesterol+Peso+Horas
> Ajuste.Estudio.step<-step(Ajuste.infarto.0,scope=list(lower=Infarto~1,
upper=Infarto~Edad+Colesterol+Peso+Horas), direction="both")
Start: AIC=89.93
Infarto ~ 1
Df Deviance AIC
<none> 87.934 89.934
+ Edad 1 87.782 91.782
+ Horas 96 0.000 194.000
+ Colesterol 99 0.000 200.000
+ Peso 98 2.773 200.773
> 1-pchisq(87.934,1)
[1] 0
Por lo tanto el valor de p es igual a cero que es menor a alfa = 0,1 , entonces se descarta la
hipótesis nula.
https://www.youtube.com/watch?v=tCXc2zl3dew