The HLM program encompasses
5 modules that may be used to fit different types of models:
The options available
for each module are listed in the overview of modeling options
in HLM modules. Methods of estimation offered are discussed
in the overview of estimation methods used in HLM.
The first task in using
HLM is to construct the Multivariate Data Matrix (MDM) from
raw data or from a statistical package.
Data file(s) must be sorted
by the level-2 and, if using HLM3 or HMLM2, the level-3 ID.
When creating an MDM file for HCM2, row and column IDs are
needed. While it is possible to build the MDM file from a
single data file, this option is not suggested when the data
file is very large. Information on the rules ID variables
have conform to, and the construction of format statements
when ASCII files are used as input are given elsewhere.
After identifying the
type of model required as described in Step 1, the appropriate
option should be selected on the Select MDM type dialog
box accessed via the Make new MDM file option on the
File menu.
The procedure to create
a MDM file consists of three major steps. The user needs to
- Inform HLM of the input and MDM file type.
- Supply HLM with the appropriate information for the data,
the command and the MDM files.
- Check if the data have been properly read into HLM.
Once the MDM file is constructed,
all subsequent analyses will be computed using the MDM file
as input. It will therefore be unnecessary to read the larger
(level-1) data file in computing these analyses. The efficient
summary of data in the MDM file leads to faster computation.
The MDM file is like a "system file" in a standard
computing package in that it contains not only the summarized
data but also the names of all of the variables.
Users of previous versions
of HLM should note that the MDM file format replaces the previously
used SSM file format entirely. As such, HLM6 is not downward
compatible - to use previously analyzed data in HLM6, a new
MDM file has to be created to replace the previously used
SSM file.
For examples of the construction
of the MDM files for some combinations of data type and HLM
module, see the overview of constructing MDM files. Note that
MDM files should preferably be given a name with a *.MDM file
extension to facilitate easy retrieval at a later date. Specifications
of the data used, missing data (if any), etc. are saved in
a MDM template file (*.MDMT) file. The MDMT file can be retrieved
later to remake or change the contents of the MDM file. Descriptive
statistics on all variables included in an MDM file are saved
to a file automatically placed in the same folder as the MDM
file, with a *.STS file extension. This file can be opened
in Notepad, Wordpad, etc. Inspection of this file prior to
model specification is imperative.
Basic model specification
has three steps:
- Specifying the level-1 model, which defines a set of level-1
coefficients to be computed for each level-2 unit.
- Specifying a level-2 structural model to predict each
of the level-1 coefficients.
- Specifying the level-1 coefficients to be viewed as random
or non-random.
After these three steps
have been completed, a linear model is obtained. The next
phase of model specification is to
- Select the type of outcome variable if running an HGLM
model with HLM2 or HLM3.
- Select the level-1 error structure if running an HMLM/HMLM2
model.
- Provide names for the basic output file, the graphing
equations file (if required) and to request residual files.
These selections are made
using the modules' respective Basic Settings dialog
boxes, which are accessed by clicking the Basic Settings
option on the main menu bar or the Outcome button at
the top left of the modeling window. Options available on
this dialog box for the various modules are listed in the
overview of modeling options in HLM modules, and the amount
of output is controlled via the Output Settings option
on the Other Settings menu.
In addition, various statistical
options are available. Additionally, the iterative procedure
and the amount and type of output can be controlled. Again,
these differ by module. Access to the options are via the
Other Settings option on the main menu bar. Options
accessible via this option for the various modules are listed
in the overview of modeling options in HLM modules.
Once model specification
has been completed, the model can be saved to a command file
(*.mlm file extension). This file can be retrieved for modification
at a later stage, and contains all the information for a given
model, including the name of the MDM file on which the analysis
is based. To do so, use the Save As option on the File
menu.
Data-based graphs, that
can be used as a exploratory analysis tool prior to running
the analysis, are accessed via the Graph Data option
for HLM2 and HLM3 only. For more on data-based graphs, see
the data based graphs page.
The analysis is performed
by clicking the Run Analysis option on the main menu
bar after the model specification has been completed and/or
the model has been saved.
The standard output
file
By default, this file
will be named hlm2.txt, hlm3.txt, hmlm.txt,
hmlm2.txt or hcm2.txt and will contain the following:
- Ordinary least squares and generalized least squares results
for the fixed coefficients defined in the level-2 model.
- Estimates of variance and covariance components and approximate
chi-square tests for the variance components.
- A variety of auxiliary diagnostic statistics.
- Additional output for hypothesis-testing procedures and
requested optional statistical features.
- Unit-specific and population-average results in the case
of HGLM models.
- Output for a number of level-1 error structures, depending
on model specification, for HMLM and HMLM2 models.
Residual files
Residual files are created
during the analysis in the format specified during Step 2
above, and can be opened in the statistical package of choice
for inspection and/or further analysis. Residual files are
available for HLM2, HLM3, HGLM and HCM2 models but contents
vary according to module.
The level-1 residual file will
contain
- level-1 residuals (the differences between the observed
and fitted values),
- the fitted values,
- the square root of sigma_squared,
- the values of the level-1 and level-2 predictors entered
in the model, and those of other level-1 and level-2 variables
selected by the user.
- A level-2 residual file will contain some or all of the
following:
- EB residuals,
- OL residuals,
- and fitted values for each level-1 coefficient
based on the estimated level-2 models
- posterior variances and covariances
of the estimates of intercept and slopes
- level-2 predictors used in analysis
plus additional level-2 predictors requested by the user
for inclusion
- Mahanalobis distance of a unit's EB
estimates from its fitted value
- Expected values of the order statistics
for a sample of similar size from a population with chi-square(v)
distribution
- Three estimates of the level-1 variability:
the natural log of the total standard deviation within each
unit, the natural log of the residual standard deviation
within each unit based on its least squares regression,
and the natural log of the residual standard deviation from
the final fitted fixed effects model.
A three-level analysis
will produce two residual files, one at level-2 and one at
level-3. The 3-level residual file contains the EB residuals,
the OL residuals, fitted values, posterior variance and covariances;
listed by level-3 unit ID.
In the case of HGLM analyses
using HLM2 or HLM3, residual file contents are based on the
unit-specific model results.
In addition, level-2 predictors
can be included in the level-2 residual file and level-3 predictors
in the level-3 residual file. However, other statistics provided
in the residual file of HLM2, for example the Mahalanobis
distance measures, are
not available in the residual files produced by HLM3.
The row residual file
(produced only by HCM2) contains the following the Empirical
Bayes estimates and its associated posterior variances, and
additional predictors as selected by the user for inclusion
in the residual file.
The column residual file
(produced only by HCM2) contains the Empirical Bayes estimates
and its associated posterior variances, and additional predictors
as selected by the user for inclusion in the residual file
Variance-covariance
matrices of estimates:
In addition, HLM offers
output files containing the variance-covariance matrices of
estimates of fixed effects and variance-covariance parameters.
These can be saved by checking the print variance-covariance
matrices option (available for HLM2, HLM3 and HGLM models
only) in the Output Settings dialog box accessed via
the Other Settings menu. These files can be opened
in Notepad, Wordpad etc. In the case of HGLM analyses using
HLM2 or HLM3, contents are based on the unit-specific model
results.
Model-based graphs:
Finally, HLM offers the
option to make model-based graphs after completion of the
analysis. HLM2 and HLM3 offers the complete range of graphs,
while HMLM, HMLM2 and HCM2 offer a subset of options. Options
available on this dialog box for the various modules are listed
in the overview of modeling options in HLM modules. Examples
can be viewed by looking at the model
based graphs page.
