Dear Sir,


I am a new user of R and I am doing a tast, which is: find the maximum likelihood estimate of the parameter of Gaussian distribution for generated 100 numbers by using >x=rnorm(100, mean=3, sd=1).

I tried to use following Maximum Likelihood function
fn<-function(x)
(-50*log((sd(x))^2))-50*log(sqrt(2*pi))-(1/2*((mean(x))^2))*(sum((x-(mean(x))^2)),
but it did not work.

I am looking for the complete syntax to finish my target task.

Thanks for your help.

Best regards.
Edward Sun
Germany

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to