Learn R Programming

systemfit (version 1.1-2)

logLik.systemfit: Log-Likelihood value of systemfit object

Description

This method calculates the log-likelihood value of a fitted object returned by systemfit.

Usage

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

Arguments

object
an object of class systemfit.
...
currently not used.

Value

  • A numeric scalar (the log-likelihood value) with 2 attributes: nobs (total number of observations in all equations) and df (number of free parameters, i.e. coefficients + elements of the residual covariance matrix).

See Also

systemfit, logLik

Examples

Run this code
data( "Kmenta" )
eqDemand <- consump ~ price + income
eqSupply <- consump ~ price + farmPrice + trend
system <- list( demand = eqDemand, supply = eqSupply )

## perform a SUR estimation
fitsur <- systemfit( system, "SUR", data = Kmenta )

## residuals of all equations
logLik( fitsur )

Run the code above in your browser using DataLab