Hi, Dieter, Gad, and all,

Thank you very much for your reply!

So here is my data,  you can copy it into a file names "sample.txt"

0 -0.074 -0.098 -0.192 0.1 -0.106
0 -0.234 -0.212 -0.074 0.267 -0.122
0 -0.015 0.176 -0.061 0.179 0.178
0 -0.319 0.097 -0.122 0.08 -0.045
0 -0.106 -0.167 -0.209 -0.027 -0.152
0 0.261 -0.014 0.168 -0.413 -0.067
0 -0.323 -0.142 -0.061 0.187 -0.142
0 -0.238 0.169 -0.052 -0.075 -0.29
0 -0.099 0.023 -0.042 0.128 -0.121
0 0.006 0.199 0.216 -0.525 0.975
0 0.035 0.124 0.177 -0.13 0.019
0 -0.105 -0.119 -0.29 -0.007 -0.092
0 -0.444 0.153 0.133 0.371 -0.123
0 0.006 0.145 0.016 -0.286 0.045
0 -0.314 -0.185 -0.255 0.002 -0.322
0 -0.125 0.097 -0.381 0.309 -0.086
0 -0.258 -0.18 -0.328 -0.005 -0.255
0 0.039 0.108 0.42 -0.737 -0.102
0 -0.019 -0.106 -0.222 0.227 -0.11
0 -0.212 -0.054 -0.272 0.101 -0.257
0 -0.097 -0.099 -0.42 0.033 -0.236
0 0.103 0.037 0.25 -0.529 0.555
0 -0.172 -0.189 -0.151 0.045 -0.122
0 -0.048 -0.081 -0.315 0.104 -0.085
0 0.169 -0.147 -0.165 0.247 -0.166
0 -0.135 -0.214 -0.357 0.047 -0.001
0 -0.102 -0.097 -0.351 0.068 -0.177
0 -0.07 -0.075 -0.178 -0.007 -0.3
0 -0.124 -0.208 -0.069 0.052 -0.399
0 -0.231 -0.245 -0.098 -0.056 -0.339
0 0.031 -0.158 0.329 -0.287 0.049
0 -0.035 -0.098 0.181 -0.239 -0.141
0 -0.245 -0.188 -0.069 -0.193 -0.019
0 -0.402 0.462 0.103 0.045 0.041
0 -0.026 -0.09 -0.082 0.05 -0.166
0 -0.052 -0.096 -0.098 0.222 -0.174
0 -0.083 -0.272 -0.375 0.033 -0.175
0 -0.202 -0.14 -0.436 0.172 -0.133
0 -0.101 -0.06 -0.085 -0.026 -0.002
0 0.459 0.233 0.156 -0.467 0.232
1 -0.062 -0.209 0.092 -0.074 -0.155
1 0.478 0 -0.099 0.149 -0.038
1 -0.112 -0.087 0.076 -0.052 -0.265
1 0.366 0.327 0.386 -0.68 0.541
1 -0.171 0.01 -0.031 -0.11 -0.187
1 0.187 -0.028 -0.048 -0.161 0.001
1 0.05 0.279 0.123 -0.32 0.003
1 -0.224 0.109 -0.46 0.224 -0.351
1 -0.19 0.13 -0.079 0.256 -0.045
1 -0.087 0.203 0.03 -0.158 -0.114
1 0.411 0.153 0.409 -0.766 -0.317
1 -0.344 0.088 0.203 0.094 -0.097
1 -0.109 0.075 -0.035 0.152 -0.287
1 -0.063 0.097 0.239 0.059 0.144
1 -0.193 0.171 -0.094 0.137 -0.094
1 0.138 0.087 0.236 -0.198 -0.125
1 -0.014 -0.171 0.08 -0.393 0.055
1 0.508 0.272 0.25 -0.567 0.546
1 0.003 -0.119 0.128 -0.316 -0.142
1 -0.185 0.043 0.012 0.06 -0.477
1 0.287 0.324 -0.131 0.129 -0.052
1 0.176 0.162 0.338 -0.681 -0.081
1 -0.045 0.049 -0.026 0.379 -0.15
1 -0.12 -0.053 -0.397 -0.19 -0.113
1 0.091 0.115 0.007 -0.388 0.458
1 -0.064 0.189 -0.077 0.167 -0.088
1 -0.335 0.016 -0.067 0.077 -0.173
1 0.028 -0.206 -0.153 -0.297 -0.012
1 0.198 -0.176 0.031 0.042 -0.095
1 0.057 -0.094 0.3 -0.056 -0.11
1 0.163 -0.001 0.457 -0.974 0.684
1 0.013 -0.212 -0.239 0.282 -0.062
0 -0.012 -0.18 -0.18 0.109 -0.065
0 -0.187 -0.299 -0.135 0.285 -0.106
0 -0.138 -0.147 -0.084 0.103 -0.101
0 -0.115 -0.107 -0.201 0.376 -0.146
0 -0.093 -0.058 0.265 -0.61 -0.006
0 -0.111 -0.227 -0.327 0.326 -0.185
1 -0.195 -0.167 -0.056 -0.126 -0.055
1 0.064 0.136 0.25 -0.258 -0.016
1 0.124 -0.098 0.077 -0.44 0.097
1 -0.079 0.149 -0.109 0.18 -0.188
1 0.295 0.241 0.292 -0.359 0.524
1 0.138 0.176 0.013 -0.133 -0.044
1 -0.098 0.023 -0.079 -0.254 -0.144
1 0.114 0.146 0.037 -0.354 -0.062
1 0.116 -0.239 0.262 -0.285 -0.13

then run:

library(MASS)
matrix <- read.table("sample.txt")
names(matrix)<- c("g0","g761","g2809","g3106","g4373","g4583")
fo <- as.formula(g0 ~ g761 * g2809 * g3106 * g4373 * g4583)
lr <- glm(fo, family=binomial(link=logit), data=matrix)

if look into:
summary(lr)

you'll see my problem.

Thanks a lot!

Best Regards,
Maggie




On Wed, Mar 18, 2009 at 3:30 PM, Dieter Menne <dieter.menne@menne-biomed.de>
wrote:
> Maggie Wang <haitian <at> ust.hk> writes:
>
>> I use glm() to do logistic regression and use stepAIC() to do stepwise
model
>> selection.
>>
>> The common AIC value comes out is about 100, a good fit is as low as
around
>> 70. But for some model, the AIC went to extreme values like 1000. When I
>> check the P-values, All the independent variables (about 30 of them)
>> included in the equation are very significant, which is impossible,
because
>> we expect some would be dropped.  This situation is not uncommon.
>>
>> A summary output like this:
>>
>> Coefficients:
>>                               Estimate Std. Error   z value Pr(>|z|)
>> (Intercept)                   4.883e+14  1.671e+07  29217415   <2e-16 ***
>> g761                         -5.383e+14  9.897e+07  -5438529   <2e-16 ***
>> g2809                        -1.945e+15  1.082e+08 -17977871   <2e-16 ***
>> g3106                        -2.803e+15  9.351e+07 -29976674   <2e-16 ***
>
> I suspect that you have specified your target variables incorrectly.
> Note that there three method to define the variables which is better
explained
> in MASS, chapter Binomial data in the budworm context.
>
> Try to extract a few of your data and post these here in a self running
> example.
>
> Dieter
>
> ______________________________________________
> R-help@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.
>

	[[alternative HTML version deleted]]


