[R] System of logistics Equations-correction

Bernardo Rangel Tura tura at centroin.com.br
Fri Feb 20 11:33:13 CET 2009


Hi R-masters

Sorry but i make a error in script the correct code to fake database of research 

Subj<-rep(1:20,each=60)
Sti<-rep(c("G","S","P"),40)
SP<-rep(c("S","P"),each=60)
AG<-rep(c("A","P"),60)
Mer<-rep(c("M","NM","M","NM"),each=30)
Car<-round(runif(120,1,7),0)
Val<-round(runif(120,-7,7),0)
base<-data.frame(Subj,Sti,SP,AG,Mer,Car,Val)


In my hypothesis:

logit(Sti=="G") ~ SP+AG+Mer+Car+Val+SP*Car+Mer*Val+AG*Val + errorG

logit(Sti=="S") ~ SP+AG+Mer+Car+Val+SP*Car+Mer*Val+AG*Val + errorS

logit(Sti=="P") ~ SP+AG+Mer+Car+Val+SP*Car+Mer*Val+AG*Val + errorP

I test and the 3 terms of error (errorG,errorS,errorP) is correlated.

So I think useful adjust a system of logistic equations to tread the 3
equations and in same time to obtain estimatives of effects and
uncorrelated error terms.


The systemfit package fit linear system and non-linear system but is
possible adjust a logistic system in R?

Thanks in advance



-- 
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil




More information about the R-help mailing list