[R] Summary of Netlogic problem

hkimscil hkimscil at scils.rutgers.edu
Thu May 9 22:51:10 CEST 2002


Hello all -

Does netlogit accept fractions as inputs (in indepedent matrix)? If I try the below script, the last line (summary) eradically works; it sometimes works and sometimes not. Besides, when I attempt to do the samething by reading my actual data, "summary" always fail, saying:

"
Error in cat("\n             Total Fraction Correct:", (n$ctable[1, 1] + n$ctable[2,  : 
        subscript out of bounds
"
Does any one know about this????

## script
i<-2
k<-69
x<-rgraph(k,i)
write(x[1,,], file="x1.txt", ncolumns=k)
write(x[2,,], file="x2.txt", ncolumns=k)
y.l<-x[1,,]+4*x[2,,]
y.p<-apply(y.l,c(1,2),function(a){1/(1+exp(-a))})
y<-rgraph(k,tprob=y.p)
write(y, file="y.txt", ncolumns=k)
a1<-matrix(scan("x1.txt"),nrow=k,ncol=k, byrow=T)
a1<-a1*3.212122334
a2<-matrix(scan("x2.txt"),nrow=k,ncol=k, byrow=T)
b<-matrix(scan("y.txt"),nrow=k,ncol=k, byrow=T)
al<-netlogit(b,a1+a2,nullhyp="qap",reps=3)
summary(al)
## script ends

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list