logLik.systemfit {systemfit} | R Documentation |
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, residCovDiag = FALSE, ... )
Arguments
object |
an object of class |
residCovDiag |
logical.
If this argument is set to |
... |
currently not used. |
Details
The residual covariance matrix that is used for calculating the log-likelihood value is calculated based on the actually obtained (final) residuals (not correcting for degrees of freedom). In case of systems of equations with unequal numbers of observations, the calculation of the residual covariance matrix is only based on the residuals/observations that are available in all equations.
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).
Author(s)
Arne Henningsen arne.henningsen@googlemail.com
See Also
Examples
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 )