From: Stefan Wagner <Stef.Wagner_at_students.uni-mannheim.de>

Date: Fri 10 Jun 2005 - 21:08:53 EST

(logwsAttack12(z,i=1)+logwsAttack12(z,i=2)+logwsAttack12(z,i=3)+logwsAttack12(z,i=4)+logwsAttack12(z,i=5)+logwsAttack12(z,i=6))

ws37sum <- function (z)

(logwsAttack37(z,i=1)+logwsAttack37(z,i=2)+logwsAttack37(z,i=3)+logwsAttack37(z,i=4)+logwsAttack37(z,i=5)+logwsAttack37(z,i=6)+logwsAttack37(z,i=7)+logwsAttack37(z,i=8))

wsLOG <- function (z) (ws12sum(z) + ws37sum(z)) LogSum <- function (z) (-sum(wsLOG(z)))

SP <- c(0.16, 0.10, 44, 0.80, 46)

out <- nlm (LogSum, p=SP)

out

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 10 21:22:35 2005

Date: Fri 10 Jun 2005 - 21:08:53 EST

ws12 <- function (z, i) (1/(1+exp(z[1]*(z[3]-x1[i]- z[4]*(m1[i]/n1[i]-0.5))))) ws37 <- function (z, i) (1/(1+exp(z[2]*(z[3]-x2[i]- z[5]*(m2[i]/n2[i]-0.5))))) wsAttack12 <- function (z,i) (ws12(z,i)*dec1[i]+(1-ws12(z,i))*(1-dec1[i])) wsAttack37 <- function (z,i) (ws37(z,i)*dec2[i]+(1-ws37(z,i))*(1-dec2[i]))logwsAttack12 <- function (z,i) (log(wsAttack12(z,i))) logwsAttack37 <- function (z,i) (log(wsAttack37(z,i))) ws12sum <- function (z)

(logwsAttack12(z,i=1)+logwsAttack12(z,i=2)+logwsAttack12(z,i=3)+logwsAttack12(z,i=4)+logwsAttack12(z,i=5)+logwsAttack12(z,i=6))

ws37sum <- function (z)

(logwsAttack37(z,i=1)+logwsAttack37(z,i=2)+logwsAttack37(z,i=3)+logwsAttack37(z,i=4)+logwsAttack37(z,i=5)+logwsAttack37(z,i=6)+logwsAttack37(z,i=7)+logwsAttack37(z,i=8))

wsLOG <- function (z) (ws12sum(z) + ws37sum(z)) LogSum <- function (z) (-sum(wsLOG(z)))

SP <- c(0.16, 0.10, 44, 0.80, 46)

out <- nlm (LogSum, p=SP)

out

Best regards,

Stefan Wagner

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 10 21:22:35 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:32:29 EST
*