### Aptech Systems, Inc. Worldwide Headquarters

Address:

Aptech Systems, Inc.

2350 East Germann Road, Suite #21

Chandler, AZ 85286Phone: 360.886.7100

FAX: 360.886.8922**Ready to Get Started?**### Request Quote & Product Information

### Industry Solutions

### Products

### Resources

### Support

### Training & Events

Want more guidance while learning about the full functionality of GAUSS and its capabilities? Get in touch for in-person training or browse additional references below.

### Tutorials

Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.

### What’s New in GAUSS 17

### Want to find out more?

### Have a Specific Question?

### Q&A: Register and Login

### Support Plans

Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.

### User Forums

Join our community to see why our users are considered some of the most active and helpful in the industry!

### Where to Buy

Available across the globe, you can have access to GAUSS no matter where you are.

### Recent Tags

applications character vectors CML CMLMT Constrained Optimization datasets dates dlibrary dllcall econometrics Editor error error codes error handling errors Excel file i/o GAUSS Engine GAUSS Light graphics GUI hotkeys installation license licensing linux loading data loop loops matrix manipulation Maximum Likelihood Maxlik MaxLikMT Memory multidimensional array optimization Optmum output panel data PQG graphics procs random numbers strings structures threading### Recent Questions

### Features

### Time Series 2.0 MT

### Industry Solutions

### Find out more now

### Time Series MT 2.1

### Find out more now

### Find out more now

# Resources

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

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

## 4 Answers

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");
```

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 1x2 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 1x2 matrix, truncations limits will be the

** same for all plots. Default is minimum and maximum,

** respectively.

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

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.

## Your Answer

## 4 Answers

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");
```

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 1x2 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 1x2 matrix, truncations limits will be the

** same for all plots. Default is minimum and maximum,

** respectively.

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

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.