RE: [R] help for MLE

2004-02-25 Thread Edward Sun
Hi, when I write the likelihood function as fn-function(x) -50*log(2*pi)-100*log(sigma)-(1/2*(sum((x-mu)/sigma)^2)) then what should I do since it shows that Error in log(sigma) : Object sigma not found. Thanks edward From: Edward Sun Dear Sir/Madam, I am using R version 1.8.1. I am

RE: [R] help for MLE

2004-02-25 Thread Tom Blackwell
Edward - Either optim() or fitdistr() has an additional required argument which specifies the names (and incidentally starting values) for the parameters to be estimated. Did you supply that argument ? See help(optim), help(fitdistr). - tom blackwell - u michigan medical school -

Re: [R] help for MLE

2004-02-25 Thread Spencer Graves
Have you worked through the posting guide at the end of each r-help email? In particular, have you worked the examples in help('fitdistr') in library MASS and optim? hope this helps. spencer graves Edward Sun wrote: Hi, when I write the likelihood function as fn-function(x)

RE: [R] help for MLE

2004-02-25 Thread Liaw, Andy
Do: library(mle) ?mle and read the documentation and the example. That should get you on the right track. Andy From: Edward Sun Hi, when I write the likelihood function as fn-function(x) -50*log(2*pi)-100*log(sigma)-(1/2*(sum((x-mu)/sigma)^2)) then what should I do since it

Re: [R] help for MLE

2004-02-22 Thread Spencer Graves
Is this a homework problem? The + means the statement is not syntactically complete. Perhaps you have more ( than )? Also, have you read the posting guide! http://www.R-project.org/posting-guide.html;? Many people answer their own questions just following that guide.