Dr. Federico Andreis
2010-Mar-12 17:56 UTC
[R] Likelihood Optimization With Categorical Variables
Dear all, I have the following problem: I have been using the routine "optim" in order to maximize a joint likelihood (basically a mixture with modeled weights) with quantitative variables..so far so good. Now I need to plug into the model a categorical variable (namely, age classes). Obviously, given the way optim works, it won't allow me to treat it "directly" (i.e. just plugging it in with a single parameter). I would like to avoid having to construct some heavy ifelse structure inside the function to be passed to optim, that would be quite inefficient.. Do you have any suggestion? Any other routine which could deal with categorical (along with non categorical) variables without for the aim of optimization? thanks in advance Federico Andreis Universit? degli Studi di Milano Bicocca, PhD Student MEB, Karolinska Institutet, Visiting PhD Student -- View this message in context: http://n4.nabble.com/Likelihood-Optimization-With-Categorical-Variables-tp1590874p1590874.html Sent from the R help mailing list archive at Nabble.com.