[R] cor & logistic regression

christian
Wed, 23 Jan 2002 11:48:48 -0000

mnoModell <- as.data.frame(mnoModell0)
$ attach(mnoModell)
$ cor(Q31.1,Q41.1,use="pairwise.complete.obs")
[1] 0.0833
$
$ for( i in length(mnoModell)) {
+       cor(names(mnoModell)[i],Q41.1,use="complete.obs")
+       }
Error in cor(x, y, na.method) : incompatible dimensions

In addition: Warning message:
NAs introduced by coercion
$
$ names(mnoModell)[3]
[1] "Q31.3"

Hello ,
(1) What can i do that the  loop works ?
Perhaps anything with lapply ?

(2) Is it correct that is not very useful  works with logistic regression
when sample < 100 cases ?

thanks for advance &
regards, Christian Schulz
-------------- next part --------------
An HTML attachment was scrubbed...