The class `dataset`

is a blueprint of `S4`

objects that store
the result of simulation of the aggregate daily trading data.

## Details

`theoreticals`

are the parameters used to generate the daily buys
and sells. `empiricals`

are computed from the generated daily buys and sells.
If we generate data for a 60 days using \(\alpha\)=0.1, the most likely
outcome is to obtain 6 days (0.1 x 60) as
information event days. In this case, the theoretical value of
\(\alpha\)`=0.1`

is equal to the empirically estimated value of
\(\alpha\)`=6/60=0.1`

.
The number of generated information days can, however, be different from `6`

;
say `5`

. In this case, empirical (actual) \(\alpha\) parameter derived
from the generated numbers would be `5/60=0.0833`

, which differs from the
theoretical \(\alpha\)`=0.1`

.
The weak law of large numbers ensures the empirical parameters (`empiricals`

)
converge towards the theoretical parameters (`theoreticals`

) when the number
of days becomes very large.
To detect the estimation biases from the models/methods, comparing the
estimates with `empiricals`

rather than `theoreticals`

would yield more
realistic results.

## Slots

`model`

(

`character`

) returns the model being simulated, either`"MPIN"`

, or`"adjPIN"`

.`days`

(

`numeric`

) returns the length of the generated data in days.`layers`

(

`numeric`

) returns the number of information layers in the simulated data. It takes the value`1`

for the adjusted PIN model, i.e. when`model`

takes the value`'adjPIN'`

.`theoreticals`

(

`list`

) returns the list of the theoretical parameters used to generate the data.`empiricals`

(

`list`

) returns the list of the empirical parameters computed from the generated data.`aggregates`

(

`numeric`

) returns an aggregation of information layers' empirical parameters alongside with \(\epsilon\)_{b}and \(\epsilon\)_{s}. The aggregated parameters are calculated as follows: \(\alpha_{agg} = \sum \alpha_j\)\(\alpha*= \sum \alpha\)_{j}\(\delta_{agg} = \sum \alpha_j \times \delta_j\) \(\delta*= \sum \alpha\)_{j}\(\delta\)_{j}, and \(\mu_{agg} = \sum \alpha_j \times \mu_j\)\(\mu*= \sum \alpha\)_{j}\(\mu\)_{j}.`emp.pin`

(

`numeric`

) returns the`PIN/MPIN/AdjPIN`

value derived from the empirically estimated parameters of the generated data.`data`

(

`dataframe`

) returns a dataframe containing the generated data.`likelihood`

(

`numeric`

) returns the value of the (log-)likelihood function evaluated at the empirical parameters.`warnings`

(

`character`

) stores warning messages for events that occurred during the data generation, such as conflict between two arguments.`restrictions`

(

`list`

) returns a binary list that contains the set of parameter restrictions on the original AdjPIN model in the estimated AdjPIN model. The restrictions are imposed equality constraints on model parameters. If the value of the parameter`restricted`

is the empty list`(list())`

, then the model has no restrictions, and the estimated model is the unrestricted, i.e., the original AdjPIN model. If not empty, the list contains one or multiple of the following four elements`{theta, mu, eps, d}`

. For instance, If`theta`

is set to`TRUE`

, then the estimated model has assumed the equality of the probability of liquidity shocks in no-information, and information days, i.e., \(\theta\)`=`

\(\theta'\). If any of the remaining rate elements`{mu, eps, d}`

is equal to`TRUE`

, (say`mu=TRUE`

), then the estimated model imposed equality of the concerned parameter on the buy side, and on the sell side (\(\mu\)_{b}`=`

\(\mu\)_{s}). If more than one element is equal to`TRUE`

, then the restrictions are combined. For instance, if the slot`restrictions`

contains`list(theta=TRUE, eps=TRUE, d=TRUE)`

, then the estimated AdjPIN model has three restrictions \(\theta\)`=`

\(\theta'\), \(\epsilon\)_{b}`=`

\(\epsilon\)_{s}, and \(\Delta\)_{b}`=`

\(\Delta\)_{s}, i.e., it has been estimated with just`7`

parameters, in comparison to`10`

in the original unrestricted model.`[i]`

This slot only concerns datasets generated by the function`generatedata_adjpin()`

.