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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to