[R] negative log likelihood
mat7770
matt__440 at hotmail.com
Sun Nov 8 20:12:25 CET 2009
I have two related variables, each with 16 points (x and Y). I am given
variance and the y-intercept. I know how to create a regression line and
find the residuals, but here is my problem. I have to make a loop that uses
the seq() function, so that it changes the slope value of the y=mx + B
equation ranging from 0-5 in increments of 0.01. The loop also needs to
calculate the negative log likelihood at each slope value and determine the
lowest one. I know that R can compute the best regression line by using
lm(y~x), but I need to see if that value matches the loop functions.
--
View this message in context: http://old.nabble.com/negative-log-likelihood-tp26256881p26256881.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list