[R] Likelihood between observed and predicted response

2008-09-22 Thread Christophe LOOTS
on't trust my algebra, see ?dnorm and take the log of the likelihood shown there for yourself. You're reinventing the wheel a bit here: -2*sum(dbinom(y,prob=phat,size=1,log=TRUE)) and -2*sum(dnorm(x,mean=mu,sd=sigma,log=TRUE)) will do what you want. Ben Bolker -- Christophe LOOT

[R] Likelihood between observed and predicted response

2008-05-13 Thread Christophe LOOTS
values (0 or 1). 1) Is anybody can tell me if this formula is statistically true? 2) Can someone tell me what is the formula of the likelihood between observed and predicted values for a gaussian model ? Thanks -- Christophe LOOTS PhD student - Hydrobiological modelling of fish habitats