[R] Likelihood ratio test using R
Maithili Shiva
maithili_shiva at yahoo.com
Tue Nov 4 13:47:19 CET 2008
Hi!
I am working on the Logistic Regression using R. My R script is as follows
ONS <- read.csv("ONS.csv",header = TRUE)
ONS.glm <- glm(Y ~ Age1+Age2+Sex+Education+Profession+TimeInJob+ TimeInCurrentJob+OwnResidence+Dependents+ApplIncome+FamilyInco+IIR+FOIR+YearsAtBank+SavingsAccount+CurrentAccount, family = binomial(link = logit), data=ONS)
summary(ONS.glm)
OUTPUT (RESULT) is as follows -
Deviance Residuals:
Min 1Q Median 3Q Max
-1.7888 -0.6910 -0.3220 -0.2179 3.1608
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.454e+00 1.380e-01 -10.532 < 2e-16 ***
Age1 2.313e-01 9.902e-02 2.336 0.0195 *
Age2 -6.648e-01 5.209e-02 -12.761 < 2e-16 ***
Sex -7.012e-01 7.325e-02 -9.572 < 2e-16 ***
Education -5.271e-01 7.963e-02 -6.619 3.61e-11 ***
Profession -3.512e-01 4.908e-02 -7.155 8.38e-13 ***
TimeInJob -3.107e-01 1.980e-01 -1.569 0.1166
TimeInCurrentJob 2.752e+00 1.895e-01 14.521 < 2e-16 ***
OwnResidence 1.608e+00 1.858e-01 8.654 < 2e-16 ***
Dependents -4.066e-01 1.867e-01 -2.178 0.0294 *
ApplIncome -6.401e-02 4.319e-03 -14.820 < 2e-16 ***
FamilyInco 7.148e-02 7.389e-03 9.674 < 2e-16 ***
IIR 5.765e-02 1.353e-02 4.262 2.03e-05 ***
FOIR 7.383e-07 1.056e-07 6.990 2.74e-12 ***
YearsAtBank -1.926e-07 3.519e-08 -5.473 4.42e-08 ***
SavingsAccount -2.083e-07 1.785e-07 -1.167 0.2432
CurrentAccount -1.550e+00 1.107e-01 -14.008 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 39300 on 42499 degrees of freedom
Residual deviance: 32534 on 42483 degrees of freedom
AIC: 32568
____________________________________________________________
Question No - (1)
What does this means?
Deviance Residuals:
Min 1Q Median 3Q Max
-1.7888 -0.6910 -0.3220 -0.2179 3.1608
Question No - (2)
What is the significance of these codes?
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Question No - (3)
What does this means?
Null deviance: 39300 on 42499 degrees of freedom
Residual deviance: 32534 on 42483 degrees of freedom
And this is the last question
Question No - (4)
To test Ho : All regression coefficients are ZERO, I need to use Likelihood Ratio Test (G) and the related p value. When I use minitab, I get value of G and related p, but using R language, how do I get value of G and p value?
_____________________________________________________________
I am sincerely sorry for raising these many questions? But I am sure there will be many like me who will also be immensely benefited by the replies, I may get pertaining to these questions.
Thanking you all in advance,
With warm regards
Maithili Shiva
More information about the R-help
mailing list