Get the contributions of an objective function. For glm
these are the (weighted) log-likelihood contributions, for lm the negative (weighted) squared error.
objfun(x,...)## S3 method for class 'survreg'objfun(x, newdata =NULL, weights =NULL,...)## S3 method for class 'lm'objfun(x, newdata =NULL, weights =NULL,...)## S3 method for class 'glm'objfun(x, newdata =NULL, weights =NULL, log =TRUE,...)
Arguments
x: model object.
...: further arguments passed on to objfun methods.
newdata: optional. New data frame. Can be useful for model evaluation / benchmarking.
weights: optional. Prior weights. See glm or lm.
log: should the log-Likelihood contributions or the Likelhood contributions be returned?