search for: btmp1

Displaying 1 result from an estimated 1 matches for "btmp1".

Did you mean: tmp1
2004 Sep 16
3
Estimating parameters for a bimodal distribution
...rs: two means, two standard deviations, and one proportion. Here is the code I've been using in S: btmp.bi <- function(vec, p, m1, m2, sd1, sd2) { (exp(p)/(1+exp(p)))*dnorm(vec,mean=m1,sd=abs(sd1))+ (1-(exp(p)/(1+exp(p))))*dnorm(vec,mean=m2,sd=abs(sd2)) } btmp11 <- ms( ~ - sum(log((btmp.bi(btmp1$Temp, p, m1, m2, s1, s2)))), start = list(p = 0.4, m1 = 38, m2 = 40, s1 = 1, s2 = 1), control = list(maxiter = 200)) I have looked in the archives and tried various alternatives, especially optim(), but so far have had nothing but fr...