[R] R command "leap"

From: Maura E Monville <maura.monville_at_gmail.com>
Date: Tue, 18 Dec 2007 04:00:13 -0600


After applying the "step" command to a long list of predictors I came up with the following showing there still are some non significant coefficients.
I'd like to try the command "leap". However, I don't quite understand how it returns the spared predicting variables. Can please, someone help ?

Tank you in advance.

Mara EM

> summary(stepmod)

Call:
lm(formula = yy ~ cosmat[, 1] + cosmat[, 2] + cosmat[, 3] + cosmat[,

    4] + cosmat[, 5] + cosmat[, 6] + cosmat[, 7] + cosmat[, 8] +

    cosmat[, 9] + cosmat[, 11] + cosmat[, 12] + cosmat[, 15] +
    cosmat[, 16] + cosmat[, 17] + cosmat[, 22] + cosmat[, 25] +
    cosmat[, 29] + cosmat[, 30] + cosmat[, 31] + cosmat[, 38] +
    cosmat[, 42] + cosmat[, 44] + cosmat[, 45] + cosmat[, 46] +
    cosmat[, 47] + cosmat[, 48] + cosmat[, 49] + cosmat[, 50] +
    cosmat[, 51] + cosmat[, 52] + cosmat[, 53] + cosmat[, 54] +
    cosmat[, 56] + sinmat[, 1] + sinmat[, 3] + sinmat[, 4] +
    sinmat[, 5] + sinmat[, 6] + sinmat[, 8] + sinmat[, 9] + sinmat[,
    10] + sinmat[, 13] + sinmat[, 14] + sinmat[, 17] + sinmat[,
    19] + sinmat[, 22] + sinmat[, 23] + sinmat[, 26] + sinmat[,
    35] + sinmat[, 36] + sinmat[, 39] + sinmat[, 43] + sinmat[,
    45] + sinmat[, 46] + sinmat[, 47] + sinmat[, 48] + sinmat[,
    49] + sinmat[, 50] + sinmat[, 51] + sinmat[, 52] + sinmat[,     53])

Residuals:

      Min 1Q Median 3Q Max -0.175619 -0.009864 0.001284 0.008596 0.160115

Coefficients:

              Estimate Std. Error  t value Pr(>|t|)
(Intercept)  -0.474379   0.003426 -138.484  < 2e-16 ***
cosmat[, 1]  -0.767037   0.004832 -158.726  < 2e-16 ***
cosmat[, 2]  -0.214150   0.004833  -44.306  < 2e-16 ***
cosmat[, 3]  -0.022436   0.004836   -4.639 2.15e-05 ***
cosmat[, 4]  -0.022201   0.004840   -4.587 2.58e-05 ***
cosmat[, 5]  -0.052807   0.004845  -10.899 1.84e-15 ***
cosmat[, 6]   0.012219   0.004847    2.521 0.014573 *
cosmat[, 7]   0.033468   0.004854    6.895 5.16e-09 ***
cosmat[, 8]   0.007026   0.004857    1.447 0.153564
cosmat[, 9]  -0.009502   0.004858   -1.956 0.055481 .
cosmat[, 11]  0.015284   0.004858    3.146 0.002647 **
cosmat[, 12]  0.006231   0.004856    1.283 0.204778
cosmat[, 15]  0.005461   0.004841    1.128 0.264160
cosmat[, 16]  0.010987   0.004841    2.269 0.027110 *
cosmat[, 17]  0.005367   0.004836    1.110 0.271857
cosmat[, 22] -0.005541   0.004834   -1.146 0.256570
cosmat[, 25] -0.010025   0.004849   -2.068 0.043310 *
cosmat[, 29] -0.006114   0.004861   -1.258 0.213668
cosmat[, 30] -0.005734   0.004860   -1.180 0.243061
cosmat[, 31] -0.005932   0.004860   -1.221 0.227281
cosmat[, 38]  0.006269   0.004831    1.298 0.199735
cosmat[, 42]  0.006167   0.004832    1.276 0.207140
cosmat[, 44] -0.006002   0.004854   -1.237 0.221395
cosmat[, 45]  0.006484   0.004849    1.337 0.186496
cosmat[, 46]  0.010074   0.004851    2.077 0.042425 *
cosmat[, 47] -0.004843   0.004859   -0.997 0.323225
cosmat[, 48] -0.009098   0.004852   -1.875 0.065982 .
cosmat[, 49]  0.008740   0.004865    1.797 0.077797 .
cosmat[, 50]  0.009175   0.004846    1.893 0.063481 .
cosmat[, 51] -0.005664   0.004865   -1.164 0.249310
cosmat[, 52] -0.007255   0.004853   -1.495 0.140536
cosmat[, 53]  0.004950   0.004845    1.022 0.311249
cosmat[, 54]  0.006561   0.004853    1.352 0.181764
cosmat[, 56] -0.005954   0.004847   -1.228 0.224436
sinmat[, 1]  -0.086812   0.004858  -17.871  < 2e-16 ***
sinmat[, 3]  -0.041194   0.004853   -8.488 1.22e-11 ***
sinmat[, 4]  -0.040007   0.004849   -8.250 3.00e-11 ***
sinmat[, 5]   0.012811   0.004844    2.645 0.010593 *
sinmat[, 6]   0.010845   0.004842    2.240 0.029096 *
sinmat[, 8]  -0.018422   0.004833   -3.812 0.000346 ***
sinmat[, 9]   0.008006   0.004831    1.657 0.103063
sinmat[, 10]  0.023215   0.004831    4.805 1.20e-05 ***
sinmat[, 13]  0.013663   0.004837    2.824 0.006550 **
sinmat[, 14]  0.015827   0.004845    3.267 0.001860 **
sinmat[, 17]  0.006820   0.004853    1.405 0.165442
sinmat[, 19]  0.007181   0.004861    1.477 0.145211
sinmat[, 22]  0.010290   0.004855    2.120 0.038492 *
sinmat[, 23]  0.005533   0.004854    1.140 0.259254
sinmat[, 26]  0.014857   0.004839    3.070 0.003298 **
sinmat[, 35] -0.006008   0.004847   -1.240 0.220321
sinmat[, 36] -0.004984   0.004845   -1.029 0.308021
sinmat[, 39] -0.006897   0.004862   -1.419 0.161574
sinmat[, 43] -0.004804   0.004828   -0.995 0.324064
sinmat[, 45]  0.005079   0.004842    1.049 0.298680
sinmat[, 46] -0.008775   0.004839   -1.813 0.075144 .
sinmat[, 47] -0.008346   0.004831   -1.728 0.089575 .
sinmat[, 48]  0.007352   0.004839    1.519 0.134335
sinmat[, 49]  0.007382   0.004827    1.529 0.131870
sinmat[, 50] -0.005618   0.004844   -1.160 0.251083
sinmat[, 51] -0.007934   0.004826   -1.644 0.105786
sinmat[, 52]  0.006890   0.004839    1.424 0.160050
sinmat[, 53]  0.009242   0.004847    1.907 0.061708 .
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.03716 on 56 degrees of freedom
Multiple R-Squared: 0.998,      Adjusted R-squared: 0.9959
F-statistic: 466.8 on 61 and 56 DF,  p-value: < 2.2e-16






-- 
Maura E.M

	[[alternative HTML version deleted]]

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 18 Dec 2007 - 10:06:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 18 Dec 2007 - 10:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.