Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

logLik.nlreg

Compute the Log Likelihood for Nonlinear Heteroscedastic Models


Description

Computes the log likelihood for a nonlinear model with possibly non constant variance.

Usage

## S3 method for class 'nlreg'
logLik(object, ...)

Arguments

object

an object inheriting from class nlreg representing a fitted nonlinear heteroscedastic model.

...

absorbs any additional argument.

Details

This is a method for the function logLik() for objects inheriting from class nlreg.

Value

Returns an object class logLik which is a number with attributes nobs, npar and df giving respectively the number of observations, the number of parameters (regression coefficients plus variance parameters) and the degrees of freedom in the model.

Note

The default print method for logLik objects is used.

See Also

Examples

library(boot)
data(calcium)
calcium.nl <- nlreg( cal ~ b0*(1-exp(-b1*time)), 
                     start = c(b0 = 4, b1 = 0.1), data = calcium )
logLik( calcium.nl )
##
data(metsulfuron)
metsulfuron.nl <- 
    nlreg( log(area) ~ log( b1+(b2-b1) / (1+(dose/b4)^b3) ), 
           weights = ~ ( 1+dose^exp(g) )^2, data = metsulfuron, 
           start = c(b1 = 138, b2 = 2470, b3 = 2, b4 = 0.07, g = log(0.3)),
           hoa = TRUE )
logLik( metsulfuron.nl )

hoa

Higher Order Likelihood Inference

v2.1.4.1
GPL (>= 2) | file LICENCE
Authors
R port by Alessandra R. Brazzale <alessandra.brazzale@unipd.it>, following earlier work by Douglas Bates. The function tem is based on work by Anthony Davison <Anthony.Davison@epfl.ch>
Initial release
2015-08-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.