Hi,
I am trying to do parameter estimation with optim, but I can't get it to work quite right-- I have an equation X = Y where X is a gaussian, Y is a multinomial distribution, and I am trying to estimate the probabilities of Y( the mean and sd of X are known ), Theta1, Theta2, Theta3, and Theta4; I do not know how I can specify the constraint that Theta1 + Theta2 + Theta3 + Theta4 = 1 in optim. Is there another method/package that I should use for this?
Also, I wonder if there's a more elegant way to code this equation in R; right now my function looks something like Y/rnorm( 10000, mean, sd), and I try to maximize it to 1; is it possible to "plug" the entire gaussian( instead of using rnorm ) into the equation? Thanks.


Regards,

-Dean

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to