[R] help for MLE

Andy Bunn abunn at montana.edu
Sun Feb 22 20:20:26 CET 2004


I fear you have a problem with your parentheses. The '>' sign turns to a
'+' when the line is incomplete. See the R-FAQ for information. This
evaluates but I'm not sure if it's what you want....

fn < -function(x){
 
(-50*log((sd(x))^2))-50*log(sqrt(2*pi))-(1/2*((mean(x))^2))*(sum((x-(mea
n(x))^2)))
}


fn(1:10)


HTH, Andy




More information about the R-help mailing list