printout

printout

Synopsis

#define             GRETL_DIGITS
#define             GRETL_MP_DIGITS
void                session_time                        (PRN *prn);
void                logo                                (int quiet);
void                lib_logo                            (void);
void                gui_script_logo                     (PRN *prn);
void                gui_logo                            (PRN *prn);
void                text_print_model_confints           (const CoeffIntervals *cf,
                                                         PRN *prn);
void                print_freq                          (const FreqDist *freq,
                                                         PRN *prn);
void                print_freq_test                     (const FreqDist *freq,
                                                         PRN *prn);
void                print_xtab                          (const Xtab *tab,
                                                         gretlopt opt,
                                                         PRN *prn);
void                print_smpl                          (const DATAINFO *pdinfo,
                                                         int fulln,
                                                         PRN *prn);
void                print_contemp_covariance_matrix     (const gretl_matrix *m,
                                                         double ldet,
                                                         PRN *prn);
int                 outcovmx                            (MODEL *pmod,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);
int                 max_obs_label_length                (const DATAINFO *pdinfo);
void                obs_marker_init                     (const DATAINFO *pdinfo);
void                print_obs_marker                    (int t,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);
void                varlist                             (const DATAINFO *pdinfo,
                                                         PRN *prn);
void                maybe_list_vars                     (const DATAINFO *pdinfo,
                                                         PRN *prn);
int                 printdata                           (const int *list,
                                                         const char *mstr,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
int                 print_data_in_columns               (const int *list,
                                                         const int *obsvec,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);
int                 print_series_with_format            (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         char fmt,
                                                         int digits,
                                                         PRN *prn);
int                 text_print_fit_resid                (const FITRESID *fr,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);
int                 print_fit_resid                     (const MODEL *pmod,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);
int                 text_print_forecast                 (const FITRESID *fr,
                                                         DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
void                print_iter_info                     (int iter,
                                                         double crit,
                                                         int type,
                                                         int k,
                                                         const double *b,
                                                         const double *g,
                                                         double sl,
                                                         PRN *prn);
void                text_print_vmatrix                  (VMatrix *vmat,
                                                         PRN *prn);
void                gretl_sprint_fullwidth_double       (double x,
                                                         int digits,
                                                         char *targ,
                                                         PRN *prn);
void                gretl_print_fullwidth_double        (double x,
                                                         int digits,
                                                         PRN *prn);
void                gretl_print_value                   (double x,
                                                         PRN *prn);
char *              gretl_fix_exponent                  (char *s);
void                bufspace                            (int n,
                                                         PRN *prn);
void                print_centered                      (const char *s,
                                                         int width,
                                                         PRN *prn);
void                gretl_printxn                       (double x,
                                                         int n,
                                                         PRN *prn);
int                 in_usa                              (void);
char *              bufgets                             (char *s,
                                                         size_t size,
                                                         const char *buf);
void                bufgets_init                        (const char *buf);
void                bufgets_finalize                    (const char *buf);
void                buf_rewind                          (const char *buf);
int                 bufseek                             (const char *buf,
                                                         long int offset);
long                buftell                             (const char *buf);

Description

Details

GRETL_DIGITS

#define GRETL_DIGITS 6


GRETL_MP_DIGITS

#define GRETL_MP_DIGITS 12


session_time ()

void                session_time                        (PRN *prn);

Print the current time to the specified printing object, or to stdout if prn is NULL.

prn :

where to print.

logo ()

void                logo                                (int quiet);

Print to stdout gretl version information.

quiet :

if non-zero, just print version ID, else print copyright info also.

lib_logo ()

void                lib_logo                            (void);

Print gretl library version information to stdout.


gui_script_logo ()

void                gui_script_logo                     (PRN *prn);

Print to prn a header for script output in gui program.

prn :

gretl printing struct.

gui_logo ()

void                gui_logo                            (PRN *prn);

Print gretl GUI version information to the specified printing object, or to stdout if prn is NULL.

prn :

where to print.

text_print_model_confints ()

void                text_print_model_confints           (const CoeffIntervals *cf,
                                                         PRN *prn);

Print to prn the 95 percent confidence intervals for parameter estimates contained in cf.

cf :

pointer to confidence intervals.

prn :

gretl printing struct.

print_freq ()

void                print_freq                          (const FreqDist *freq,
                                                         PRN *prn);

Print frequency distribution to prn.

freq :

gretl frequency distribution struct.

prn :

gretl printing struct.

print_freq_test ()

void                print_freq_test                     (const FreqDist *freq,
                                                         PRN *prn);


print_xtab ()

void                print_xtab                          (const Xtab *tab,
                                                         gretlopt opt,
                                                         PRN *prn);

Print crosstab to prn.

tab :

gretl cross-tabulation struct.

opt :

may contain OPT_R to print row percentages, OPT_C to print column percentages, OPT_Z to display zero entries.

prn :

gretl printing struct.

print_smpl ()

void                print_smpl                          (const DATAINFO *pdinfo,
                                                         int fulln,
                                                         PRN *prn);

Prints the current sample information to prn.

pdinfo :

data information struct

fulln :

full length of data series, if dataset is subsampled, or 0 if not applicable/known.

prn :

gretl printing struct.

print_contemp_covariance_matrix ()

void                print_contemp_covariance_matrix     (const gretl_matrix *m,
                                                         double ldet,
                                                         PRN *prn);


outcovmx ()

int                 outcovmx                            (MODEL *pmod,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);

Print to prn the variance-covariance matrix for the parameter estimates in pmod.

pmod :

pointer to model.

pdinfo :

data information struct.

prn :

gretl printing struct.

Returns :

0 on successful completion, error code on error.

max_obs_label_length ()

int                 max_obs_label_length                (const DATAINFO *pdinfo);

pdinfo :

dataset information.

Returns :

the length of the longest observation label within the current sample range.

obs_marker_init ()

void                obs_marker_init                     (const DATAINFO *pdinfo);

Check the length to which observation markers should be printed, in a tabular context. (We don't want to truncate 10-character date strings by chopping off the day.)

pdinfo :

data information struct.

print_obs_marker ()

void                print_obs_marker                    (int t,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);

Print a string (label, date or obs number) representing the given t.

t :

observation number.

pdinfo :

data information struct.

prn :

gretl printing struct.

varlist ()

void                varlist                             (const DATAINFO *pdinfo,
                                                         PRN *prn);

Prints a list of the names of the variables currently defined.

pdinfo :

data information struct.

prn :

gretl printing struct

maybe_list_vars ()

void                maybe_list_vars                     (const DATAINFO *pdinfo,
                                                         PRN *prn);

Prints a list of the names of the variables currently defined, unless gretl messaging is turned off.

pdinfo :

data information struct.

prn :

gretl printing struct

printdata ()

int                 printdata                           (const int *list,
                                                         const char *mstr,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

Print the data for the variables in list over the currently defined sample range.

list :

list of variables to print.

mstr :

optional string holding names of non-series objects to print.

Z :

data matrix.

pdinfo :

data information struct.

opt :

if OPT_O, print the data by observation (series in columns); if OPT_N, use simple obs numbers, not dates.

prn :

gretl printing struct.

Returns :

0 on successful completion, 1 on error.

print_data_in_columns ()

int                 print_data_in_columns               (const int *list,
                                                         const int *obsvec,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);

Print the data for the variables in list. If obsvec is not NULL, it should specify a sort order; the first element of obsvec must contain the number of observations that follow. By default, printing is plain text, formatted in columns using space characters, but if the prn format is set to GRETL_FORMAT_CSV then printing respects the user's choice of column delimiter, and if the format is set to GRETL_FORMAT_RTF the data are printed as an RTF table.

list :

list of variables to print.

obsvec :

list of observation numbers (or NULL)

Z :

data matrix.

pdinfo :

data information struct.

prn :

gretl printing struct.

Returns :

0 on successful completion, non-zero code on error.

print_series_with_format ()

int                 print_series_with_format            (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         char fmt,
                                                         int digits,
                                                         PRN *prn);


text_print_fit_resid ()

int                 text_print_fit_resid                (const FITRESID *fr,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);


print_fit_resid ()

int                 print_fit_resid                     (const MODEL *pmod,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);

Print to prn the fitted values and residuals from pmod.

pmod :

pointer to gretl model.

Z :

data array.

pdinfo :

data information struct.

prn :

gretl printing struct.

Returns :

0 on successful completion, 1 on error.

text_print_forecast ()

int                 text_print_forecast                 (const FITRESID *fr,
                                                         DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

Prints the forecasts in fr to prn, and also plots the forecasts if OPT_P is given. If a plot is requested and fr includes forecast standard errors, then the options OPT_F or OPT_L may be given to use "fill" style or lines, respectively, for the confidence bands (the default style being vertical bars per observation).

fr :

pointer to structure containing forecasts.

pdinfo :

dataset information.

opt :

if includes OPT_P, make a plot of the forecasts; if includes OPT_N, skip printing of the forecast evaluation statistics.

prn :

printing struct.

Returns :

0 on success, non-zero error code on error.

print_iter_info ()

void                print_iter_info                     (int iter,
                                                         double crit,
                                                         int type,
                                                         int k,
                                                         const double *b,
                                                         const double *g,
                                                         double sl,
                                                         PRN *prn);

Print to prn information pertaining to step iter of an iterative estimation process.

iter :

iteration number.

crit :

criterion (e.g. log-likelihood).

type :

type of criterion (C_LOGLIK or C_OTHER)

k :

number of parameters.

b :

parameter array.

g :

gradient array.

sl :

step length.

prn :

gretl printing struct.

text_print_vmatrix ()

void                text_print_vmatrix                  (VMatrix *vmat,
                                                         PRN *prn);


gretl_sprint_fullwidth_double ()

void                gretl_sprint_fullwidth_double       (double x,
                                                         int digits,
                                                         char *targ,
                                                         PRN *prn);


gretl_print_fullwidth_double ()

void                gretl_print_fullwidth_double        (double x,
                                                         int digits,
                                                         PRN *prn);


gretl_print_value ()

void                gretl_print_value                   (double x,
                                                         PRN *prn);


gretl_fix_exponent ()

char *              gretl_fix_exponent                  (char *s);

Some C libraries (e.g. MS) print an "extra" zero in the exponent when using scientific notation, e.g. "1.45E-002". This function checks for this and cuts it out if need be.

s :

string representation of floating-point number.

Returns :

the corrected numeric string.

bufspace ()

void                bufspace                            (int n,
                                                         PRN *prn);


print_centered ()

void                print_centered                      (const char *s,
                                                         int width,
                                                         PRN *prn);

If the string s is shorter than width, print it centered in a field of the given width (otherwise just print it straight).

s :

string to print.

width :

width of field.

prn :

gretl printing struct.

gretl_printxn ()

void                gretl_printxn                       (double x,
                                                         int n,
                                                         PRN *prn);

Print a string representation of the double-precision value x in a format that depends on n.

x :

number to print.

n :

controls width of output.

prn :

gretl printing struct.

in_usa ()

int                 in_usa                              (void);


bufgets ()

char *              bufgets                             (char *s,
                                                         size_t size,
                                                         const char *buf);

This function works much like fgets, reading successive lines from a buffer rather than a file. Important note: use of bufgets() on a particular buffer must be preceded by a call to bufgets_init() on the same buffer, and must be followed by a call to bufgets_finalize(), again on the same buffer.

s :

target string (must be pre-allocated).

size :

maximum number of characters to read.

buf :

source buffer.

Returns :

s (or NULL if nothing more can be read from buf).

bufgets_init ()

void                bufgets_init                        (const char *buf);

Initializes a text buffer for use with bufgets().

buf :

source buffer.

bufgets_finalize ()

void                bufgets_finalize                    (const char *buf);

Signals that we are done reading from buf.

buf :

source buffer.

buf_rewind ()

void                buf_rewind                          (const char *buf);

Buffer equivalent of rewind(). Note that buf must first be initialized using bufgets_init().

buf :

char buffer.

bufseek ()

int                 bufseek                             (const char *buf,
                                                         long int offset);

Buffer equivalent of fseek(), with SEEK_SET. Note that buf must first be initialized via bufgets_init().

buf :

char buffer.

offset :

offset from start of buf.

Returns :

0 on success, 1 on error.

buftell ()

long                buftell                             (const char *buf);

Buffer equivalent of ftell. Note that buf must first be initialized via bufgets_init().

buf :

char buffer.

Returns :

offset from start of buffer.