printProd: Print output - prod objects

Description Usage Arguments Value Author(s) Examples

View source: R/auxFun.R

Description

The printProd() function accepts a list of prod class objects and returns a screen printed tabular in lateX format of the results.

Usage

1
2
  printProd(mods, modnames = NULL, parnames = NULL, outfile = NULL,
            ptime = FALSE, nboot = FALSE, screen = FALSE)

Arguments

mods

a list of prod objects.

modnames

an optional vector of model names. By default, model names are the @ModelMethod values in prod objects.

parnames

an optional vector of parameter names. By default, parameter names are the names() vector of @Estimatespars in prod objects.

outfile

optional string with the path and directory to store a text file (.txt, .tex, etc. depending on the specified extension) with the tabular. By default outfile = NULL.

ptime

add a row showing the computational time. By default ptime = FALSE.

nboot

add a row showing the number of bootstrap repetitions. By default nboot = FALSE.

screen

print the table on-screen without teX format. By default screen = FALSE.

Value

The output of the function printProd is either a screen printed tabular in lateX format of prod object results or a text file tabular in lateX format of prod object results.

Author(s)

Gabriele Rovigatti

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
    data("chilean")

    # run various models
    WRDGfit <- prodestWRDG_GMM(chilean$Y, fX = cbind(chilean$fX1, chilean$fX2),
                          chilean$sX, chilean$pX, chilean$idvar, chilean$timevar)
    OPfit <- prodestOP(chilean$Y, fX = cbind(chilean$fX1, chilean$fX2), chilean$sX,
                        chilean$pX, chilean$idvar, chilean$timevar)

    # show the output in latex - tabular format
    printProd(list(OPfit, WRDGfit), modnames = c('Olley-Pakes', 'Wooldridge'),
              parnames = c('bunsk', 'bsk', 'bk'))
    # show the output on-screen - no teX format
    printProd(list(OPfit, WRDGfit), modnames = c('Olley-Pakes', 'Wooldridge'),
              parnames = c('bunsk', 'bsk', 'bk'), screen = TRUE)
  

prodest documentation built on June 20, 2018, 5:04 p.m.