Dear all, I'm trying to estimate the parameters of a special case of a poisson model, where the specified equation has an integral and several fixed parameters. I think that the MLE command in STATS4 package could be a good choice, but it's a little complicated. I've got some problems with the offset and I don't understand some of the functions. Do you know where can I find some explicit tutorial about a poisson regression with MLE or, maybe better, about maximum likelyhood estimation? Best wishes Antonio Gasparrini Public and Environmental Health Research Unit (PEHRU) London School of Hygiene & Tropical Medicine Keppel Street, London WC1E 7HT, UK Office: 0044 (0)20 79272406 Mobile: 0044 (0)79 64925523 www.lshtm.ac.uk/pehru/ antonio.gasparrini at lshtm.ac.uk
Dear all, I'm trying to estimate the parameters of a special case of a poisson model, where the specified equation has an integral and several fixed parameters. I think that the MLE command in STATS4 package could be a good choice, but it's a little complicated. I've got some problems with the offset and I don't understand some of the functions. Do you know where can I find some explicit tutorial about a poisson regression with MLE or, maybe better, about maximum likelyhood estimation? Best wishes Antonio Gasparrini Public and Environmental Health Research Unit (PEHRU) London School of Hygiene & Tropical Medicine Keppel Street, London WC1E 7HT, UK Office: 0044 (0)20 79272406 Mobile: 0044 (0)79 64925523 www.lshtm.ac.uk/pehru/ antonio.gasparrini at lshtm.ac.uk
Dear all, I'm trying to estimate the parameters of a special case of a poisson model, where the specified equation has an integral and several fixed parameters. I think that the MLE command in STATS4 package could be a good choice, but it's a little complicated. I've got some problems with the offset and I don't understand some of the functions. Do you know where can I find some explicit tutorial about a poisson regression with MLE and/or about maximum likelihood estimation with R? Best wishes Antonio Gasparrini Public and Environmental Health Research Unit (PEHRU) London School of Hygiene & Tropical Medicine Keppel Street, London WC1E 7HT, UK Office: 0044 (0)20 79272406 Mobile: 0044 (0)79 64925523 www.lshtm.ac.uk/pehru/ antonio.gasparrini at lshtm.ac.uk
Hello,
I'm trying to obtain a maximum likelyhood estimate of a gaussian model
by the MLE command, as I did with a Poisson model:
x <- rep(1:2,each=500)
y <- rnorm(length(x), mean=10+3*x, sd=1)
glm1 <- glm(y ~ x , family=gaussian())
library(stats4)
func1 <- function(alfa=10, beta=3, sigma=1)
-sum(dnorm(y, mean=alfa+beta*x, sd=sigma), log=FALSE)
mle(func1, method = "BFGS")
func2 <- function(alfa=10, beta=3, sigma=1)
-sum((1/sqrt(2*pi*sigma^2))*exp(-0.5*(((y-alfa-beta*x)^2)/sigma^2)))
mle(func2, method = "BFGS")
I don't understand why it doesn't work.
Have you some suggestions?
Thank you so much for your help
Antonio Gasparrini
Public and Environmental Health Research Unit (PEHRU)
London School of Hygiene & Tropical Medicine
Keppel Street, London WC1E 7HT, UK
Office: 0044 (0)20 79272406
Mobile: 0044 (0)79 64925523
www.lshtm.ac.uk/pehru/
antonio.gasparrini@lshtm.ac.uk
[[alternative HTML version deleted]]