bootstrap

bootstrap

Functions

Types and Values

enum BootMethod

Description

Functions

bootstrap_analysis ()

int
bootstrap_analysis (MODEL *pmod,
                    int p,
                    int B,
                    double alpha,
                    const DATASET *dset,
                    gretlopt opt,
                    PRN *prn);

Calculates a bootstrap confidence interval or p-value for a given coefficient in a given model, estimated via OLS. If the first lag of the dependent variable is present as a regressor it is handled correctly but more complex lag autoregressive schemes are not (yet) handled.

Parameters

pmod

model to be examined.

 

p

0-based index number of the coefficient to analyse.

 

B

number of replications.

 

alpha

for use when calculating confidence interval.

 

dset

dataset struct.

 

opt

option flags: may contain OPT_P to compute p-value (the default is to calculate confidence interval); OPT_N to use simulated normal errors, OPT_X to resample "pairs", or OPT_W to do the wild bootstrap (the default method being to resample the empirical residuals); OPT_G to display graph, OPT_S for silent operation.

 

prn

printing struct.

 

Returns

0 on success, non-zero code on error.


bootstrap_ci_matrix ()

gretl_matrix *
bootstrap_ci_matrix (const MODEL *pmod,
                     const DATASET *dset,
                     int p,
                     int B,
                     double alpha,
                     int method,
                     int studentize,
                     int *err);

bootstrap_pvalue ()

double
bootstrap_pvalue (const MODEL *pmod,
                  const DATASET *dset,
                  int p,
                  int B,
                  int method,
                  int *err);

bootstrap_test_restriction ()

int
bootstrap_test_restriction (MODEL *pmod,
                            gretl_matrix *R,
                            gretl_matrix *q,
                            double test,
                            int g,
                            const DATASET *dset,
                            gretlopt opt,
                            int method,
                            PRN *prn);

Calculates a bootstrap p-value for the restriction on the coefficients of pmod represented by the matrices R and q . If lags of the dependent variable are present as regressors they should be handled correctly so long as the lagged terms were generated in the standard gretl manner.

Parameters

pmod

model to be examined.

 

R

left-hand restriction matrix, as in Rb = q.

 

q

right-hand restriction matrix.

 

test

initial test statistic.

 

g

number of restrictions.

 

dset

pointer to dataset.

 

opt

options passed to the restrict command.

 

method

bootstrap method.

 

prn

printing struct.

 

Returns

0 on success, non-zero code on error.


bootstrap_ok ()

int
bootstrap_ok (int ci);

bootstrap_save_data ()

int
bootstrap_save_data (const char *fname);

Types and Values

enum BootMethod

Members

BOOT_METHOD_RESIDUALS

   

BOOT_METHOD_PAIRS

   

BOOT_METHOD_WILD

   

BOOT_METHOD_PARAMETRIC