Resources

Failure reading Maxboot parameters dataset, Error G0125 Read past end of file

0

hi,

I ran a bootstrap using the Maxboot function (from the Maximum Likliehood application package) and save the parameters into a file let say bootparameter.

My question is , how can i see the parameters distribution or read that bootparameter file?

If I try to read it with the loadd function, I get the error:

error G0125:Read past end of file
Tags: asked June 13, 2013

4 Answers

0

You are wanting to view the bootstrapped parameter estimates that the maxboot function saves to a GAUSS dataset, correct? If so, they should be in a file with a .dat extension, such as bootparameter.dat. You can load the contents of a GAUSS dataset into a file with the loadd function like this:

p_boot = loadd("bootparameter");

If bootparameter.dat is not in your GAUSS current working directory, make sure to add the path, i.e.:

p_boot = loadd("C:\\gauss13\\myproj\\bootparameter");
0

You can produce a plot showing the distribution using the MaxDensity procedure that comes with Maxlik. The arguments are the dataset containing the bootstrapped coefficients, and a list of columns that you want to be displayed.

**> MAXdensity
**
** Purpose: To compute kernel density estimate and plot.
**
**
** Format: ( px,py,sm } = MAXdensity(dataset,pars);
**
** Input: dataset string, name of GAUSS dataset
** containing data.
**
** pars Kx1 vector, selected columns for
** estimation and display.
**
**
** Output: px _max_NumPointsx1 vector, abscissae.
** py _max_NumPointsx1 vector, ordinates.
** sm Kx1, or Nxk, or Nx1 smoothing coefficients.
**
** Remarks:
**
** kernel density plots of the selected parameters are
** generated.
**
** Globals:
**
** _max_Kernel Kx1 character vector, type of kernel:
**
** NORMAL – normal kernel
** EPAN – Epanechnikov kernel
** BIWGT – biweight kernel
** TRIANG – triangular kernel
** RECTANG – rectangular kernel
** TNORMAL – truncated normal kernel
**
** If _max_Kernel is scalar, the kernel is the same
** for all parameters. Default = { NORMAL };
**
** _max_NumPoints scalar, number of points to be computed for plots
**
** _max_EndPoints Kx2 matrix, lower (in first column) and upper
** (in second column) endpoints of density. Default is
** minimum and maximum, respectively, of the parameter
** values. If 1×2 matrix, endpoints will be the same
** for all parameters.
**
** _max_Smoothing Kx1 vector or Nx1 vector or NxK matrix, smoothing
** coefficients for each plot. If scalar, smoothing
** coefficient will be the same for each plot. If zero,
** smoothing coefficient will be computed by CMLdensity.
** If matrix, smoothing coefficient will be different for
** each observation.
** Default = 0;
**
** _max_Truncate Kx2 matrix, lower (in first column) and upper (in
** second column) truncation limits for truncated normal
** kernel. If 1×2 matrix, truncations limits will be the
** same for all plots. Default is minimum and maximum,
** respectively.

0

thank all of you. I have tried your suggestions but that the error message i keep receiving:

C:\gauss12\src\saveload.src(54) : error G0125 : Read past end of file
Currently active call: loadd [54] C:\gauss12\src\saveload.src
Stack trace:
   loadd

0

I opened the dataset file that you sent in and checked the dimensions of the dataset like this:

open fh = eltcoeff for read;
r = rowsf(fh);
c = colsf(fh);

It reported that the dataset had 0 rows and 36 columns. I next checked to see what variables were in the dataset like this:

//using same 'fh' file handle from above
vnames = getnamef(fh);

print vnames;

and saw that the variable names:

PAR_1
PAR_2
PAR_3
.
.
.
PAR_36

had been added to the dataset, but no values were assigned to them. It seems that a problem is occurring such that the data is not being written to the dataset.

aptech
227