- data
A dataframe with 2 variables: the first
corresponds to buyer-initiated trades (buys), and the second corresponds
to seller-initiated trades (sells).
- method
A character string referring to the method
used to estimate the model of Duarte09;textualPINstimation.
It takes one of two values: "ML"
refers to the standard maximum likelihood
estimation, and "ECM"
refers to the expectation-conditional maximization
algorithm. The default value is "ECM"
. Details of the ECM method,
and comparative results can be found in
Ghachem2022;textualPINstimation, and in
Ghachem2022b;textualPINstimation.
- initialsets
It can either be a character string referring to
prebuilt algorithms generating initial parameter sets or a dataframe
containing custom initial parameter sets.
If initialsets
is a character string, it refers to the method of generation
of the initial parameter sets, and takes one of three values: "GE"
, "CL"
,
or "RANDOM"
. "GE"
refers to initial parameter sets generated by the
algorithm of Ersan2022b;textualPINstimation, and implemented
in initials_adjpin()
, "CL"
refers to initial parameter sets generated by
the algorithm of ChengLai2021;textualPINstimation, and
implemented in initials_adjpin_cl()
, while "RANDOM"
generates random
initial parameter sets as implemented in initials_adjpin_rnd()
.
The default value is "GE"
. If initialsets
is a dataframe, the function
adjpin()
will estimate the AdjPIN model using the provided initial
parameter sets.
- num_init
An integer specifying the maximum number of
initial parameter sets to be used in the estimation.
If initialsets="GE"
, the generation of initial parameter sets will stop
when the number of initial parameter sets reaches num_init
. It can stop
earlier if the number of all possible generated initial parameter sets is
lower than num_init
. If initialsets="RANDOM"
, exactly num_init
initial parameter sets are returned. If initialsets="CL"
: then num_init
is ignored, and all 256
initial parameter sets are used. The default
value is 20
. [i]
The argument num_init
is ignored when the argument
initialsets
is a dataframe.
- restricted
A binary list that allows estimating restricted
AdjPIN models by specifying which model parameters are assumed to be equal.
It contains one or multiple of the following four elements
{theta, mu, eps, d}
. For instance, If theta
is set to TRUE
,
then the probability of liquidity shock in no-information days, and in
information days is assumed to be the same (\(\theta\)=
\(\theta'\)). If any of
the remaining rate elements {mu, eps, d}
is set to TRUE
,
(say mu=TRUE
), then the rate is assumed to be the same on the buy side,
and on the sell side (\(\mu\)b=
\(\mu\)s). If more than one element is set to
TRUE
, then the restrictions are combined. For instance, if the argument
restricted
is set to list(theta=TRUE, eps=TRUE, d=TRUE)
, then the
restricted AdjPIN model is estimated, where \(\theta\)=
\(\theta'\), \(\epsilon\)b=
\(\epsilon\)s,
and \(\Delta\)b=
\(\Delta\)s. If the value of the argument restricted
is the empty list
(list()
), then all parameters of the model are assumed to be independent,
and the unrestricted model is estimated. The default value is the empty
list list()
.
- ...
Additional arguments passed on to the function adjpin()
. The
recognized arguments are hyperparams
, and fact
. The argument
hyperparams
consists of a list containing the hyperparameters of the ECM
algorithm. When not empty, it contains one or more of the following
elements: maxeval
, and tolerance
. It is used only when the method
argument is set to "ECM"
. The argument fact
is a binary value that
determines which likelihood functional form is used: A factorization of
the likelihood function by Ersan2022b;textualPINstimation
when it is set to TRUE
, otherwise, the original likelihood function of
Duarte09;textualPINstimation. The default value is TRUE
.
More about these arguments are in the Details section.
- verbose
A binary variable that determines whether
detailed information about the steps of the estimation of the AdjPIN model
is displayed. No output is produced when verbose
is set to
FALSE
. The default value is TRUE
.