The very sophisticated computer program LVPLS for static partial least squares models was developed by Lohmöller (1984)(1989).Unfortunately, it is not effectively applicable to dynamic path models.
The computer programme DPLS (Strohe and Geppert; 1997) is available as both PC-ISP macros and XploRe (Härdle, Klinke, and Turlach; 1995) quantlets. The syntax to control the programme is nearly identical in both versions. In XploRe it consists of three basic modules. The first one puts the DPLS algorithm within the XploRe environment into action, the second one calculates a redundancy measure and the last one is a tool for easier creating input variables. This one works on the base of several menus and dialogs. So it is not necessary to know all input matrices exactly in advance and the only input to be prepared by the use of ordinary XploRe commands is the indicator matrix.
The further input matrices firstly are to be to created and defined by the above mentioned tool (third basic module) or ``by hand''. But if a user wants to calculate a model several times one after the other and if he/she wants to modify parameters on the fly in a programmed simulation or something like this he/she can take an advantage by using the basic programmes directly. In that case one has to know more about the details of input and output of the corresponding module.
|
At first, for running a DPLS session,
XploRe
has to be
started. One must load the quantlib
metrics
into memory by using the
library
command.
XploRe
users have to type:
library("metrics")
First, a design-making session (Figure 11.1)
could be started by the command mentioned above. There y is
a
-matrix with manifest variables (indicators). The
output design contains several variables. Among them dy
is matrix (
) with outer designs (0 or 1). Rows are
counting manifest variables. Furthermore, d is a
matrix with inner unlagged designs (0 or 1). No diagonal values
are allowed. The (
) matrix dl contains the inner
lagged designs (0 or 1). Diagonal elements are showing
autoregression. The matrix w represents start weights with
same dimensions as dy. It is simply a copy of dy.
It is possible to address these variables in a container-variable with the point as an separator between them both. In the case above:
design.dy design.w design.dl design.wThe syntax of
Input parameters:
Output parameters:
Besides that, it is possible to create all matrices by hand. An easy sample can be seen below:
library("metrics") randomize(13409) b1=0.3 c1=0.6 s=500 n1=normal(s+1) n1lag=n1[1:s,] n1=n1[2:rows(n1),] ;innermodel n2=b1*n1+c1*n1lag+normal(rows(n1))/5 n=n1~n2 nn=n./sqrt(var(n)) ;loadingsmatrix p=(1|2|3|4|0|0|0)~(0|0|0|0|5|6|7) y=nn*p'+normal(rows(n),rows(p))/8 d=(0|1)~(0|0) dl=(0|1)~(0|0) w=(1|1|1|1|0|0|0)~(0|0|0|0|1|1|1) myfit=dpls(w,d,w,dl,y,1,3) myfit.b myfit.sk myfit.skl
|
As one could see above, a common
XploRe
session of DPLS
(Figure 11.2) can be started by the described
command. There
dpls
denotes the program used and w is
a term for the weights the algorithm is to start with. The term
d means the inner and dy the outer design matrix.
Furthermore, dl is a symbol for an inner design matrix as
well but it contains the lagged connections in the model. The
matrices d, dy and dl represent our idea about
the model structure. The scalar lag determines the lag order
the algorithm has to take into account. The matrix y
contains the time series of all indicators (manifest variables)
and represents virtually all empirical information available. The
digit acc stands for ``accuracy'' and controls the final stop
of the iteration process. The quantlet
dpls
uses this number in order
to check after every iteration whether or not the new calculated
values are significantly different from the previously calculated
values acc specifying how many decimals are taken into
consideration.
The syntax of quantlet
dpls
has the following structure:
Input parameters:
Output parameters:
The matrices myfit.wg and myfit.b correspond to and
in (11.2) and (11.3),
resprectively. And myfit.sk and myfit.skl are the
and
in (11.5).
All matrices are structured in a comparable way. The number of
rows are supposed to correspond with the number of variables and
the number of columns should be identical with the corresponding
number of observations. If the following model is taken as an
example, which contains 41 manifest variables with 74
observations, then the matrix y has the shape
. But
the design matrix dy which contains the available connections
between every manifest and every latent variable (``1'' for a
connection and ``0'' for none) must have the shape
because this model contains 5 latent variables. One can observe
the same structure in the matrix w with the difference that the
matrix could contain at the spots of ``1'' any other value which
should be used as starting weight by the algorithm.
The d and dl matrices are squared. The rows and the columns stand for latent variables. And since the following model is designed with connections all leading to the fifth variable, all rows are filled with noughts except of the last. This row describes which of the variables are connected to the fifth variable. With the same logic one has to decode the output variable sk which contains the unlagged path coefficients in the first part followed by the lagged ones.
|
The last tool for a DPLS session is the module
redun
.
It calculates on the base of formula (11.27) the redundancy as a criterion that is used for the
evaluation of the goodness of fit of the model. The described
overview shortly shows the usage of this module.
The syntax of
redun
is to be seen below:
Input parameters:
Output parameters: