R/print.systemfit.R

Defines functions print.systemfit.equation print.systemfit

Documented in print.systemfit print.systemfit.equation

## print a few results of the whole system
print.systemfit <- function( x,
      digits = max( 3, getOption("digits") - 1 ),... ) {

   cat("\n")
   cat("systemfit results \n")
   cat("method: ")
   if(!is.null(x$iter)) if(x$iter>1) cat("iterated ")
   cat( paste( x$method, "\n\n"))
   if(!is.null(x$iter)) {
      if(x$iter>1) {
         if(x$iter<x$control$maxiter) {
            cat( paste( "convergence achieved after",x$iter,"iterations\n\n" ) )
         } else {
            cat( paste( "warning: convergence not achieved after", x$iter,
                        "iterations\n\n" ) )
         }
      }
   }
   cat( "Coefficients:\n" )
   print( x$coefficients, digits = digits )
   invisible( x )
}


## print a few results for a single equation
print.systemfit.equation <- function( x,
      digits = max( 3, getOption("digits") - 1 ), ... ) {

   cat("\n")
   cat( x$method, " estimates for '", x$eqnLabel,
            "' (equation ", x$eqnNo, ")\n", sep = "" )

   cat("Model Formula: ")
   print( formula( x$terms ) )
   if(!is.null(x$inst)) {
      cat("Instruments: ")
      print(x$inst)
   }

   cat("\nCoefficients:")
   print( x$coefficients, digits = digits )
   invisible( x )
}

Try the systemfit package in your browser

Any scripts or data that you put into this service are public.

systemfit documentation built on March 31, 2023, 3:07 p.m.