> Dear all, > I want to directly write the loglike function of poisson- lognormal > regression and then estimate the parameters. the response (Y)is count > and I have two explanatory variable (x1:nominal) and (x2:continiuouse). > which package in R can be used ?.How can input the data and write the > loglike function and then optimize. > regards
I suggest you define a function with the process model and the likelihood and then use nlm to minimiza the negative log-likelihood. See the examples at the end of the nlm help. HTH Ruben ______________________________________________ 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.