没有合适的资源?快使用搜索试试~ 我知道了~
首页SAS-PROC-MIXED.pdf
SAS-PROC-MIXED.pdf
需积分: 50 19 下载量 192 浏览量
更新于2023-05-14
1
收藏 849KB PDF 举报
混合模型(hybrid model)是几种不同模型组合而成的一种模型。它允许一个项目能沿着最有效的路径发展。也可定义为由固定效应和随机效应(随机误差除外)两部分组成的统计分析模型。如由几个高斯分布混合起来的模型叫高斯混合模型,几个线性模型混合在一起的模型叫线性混合模型。一般的,被模拟的系统几乎不可能按照一种模式一步一步地进行,会受到很多外界因素的干扰。而混合模型能够适应不同的系统和不同情况的需要而提出一种灵活多样的动态方法。混合模型分为分析、综合、运行和废弃四个阶段,各阶段的重叠为设计员提出了模型选择。
资源详情
资源推荐
SAS PROC MIXED 1
SAS PROC MIXED
http://www.id.unizh.ch/software/unix/statmath/sas/sasdoc/stat/chap41/index.htm
Overview
The MIXED procedure fits a variety of mixed linear models to data and enables you to use these fitted models to
make statistical inferences about the data. A mixed linear model is a generalization of the standard linear model used
in the GLM procedure, the generalization being that the data are permitted to exhibit correlation and nonconstant
variability. The mixed linear model, therefore, provides you with the flexibility of modeling not only the means of
your data (as in the standard linear model) but their variances and covariances as well.
The primary assumptions underlying the analyses performed by PROC MIXED are as follows:
• The data are normally distributed (Gaussian).
• The means (expected values) of the data are linear in terms of a certain set of parameters.
• The variances and covariances of the data are in terms of a different set of parameters, and they exhibit a
structure matching one of those available in PROC MIXED.
Since Gaussian data can be modeled entirely in terms of their means and variances/covariances, the two sets of
parameters in a mixed linear model actually specify the complete probability distribution of the data. The parameters
of the mean model are referred to as fixed-effects parameters, and the parameters of the variance-covariance model
are referred to as covariance parameters.
The fixed-effects parameters are associated with known explanatory variables, as in the standard linear model. These
variables can be either qualitative (as in the traditional analysis of variance) or quantitative (as in standard linear
regression). However, the covariance parameters are what distinguishes the mixed linear model from the standard
linear model.
The need for covariance parameters arises quite frequently in applications, the following being the two most typical
scenarios:
• The experimental units on which the data are measured can be grouped into clusters, and the data from a
common cluster are correlated.
• Repeated measurements are taken on the same experimental unit, and these repeated measurements are
correlated or exhibit variability that changes.
The first scenario can be generalized to include one set of clusters nested within another. For example, if students
are the experimental unit, they can be clustered into classes, which in turn can be clustered into schools. Each level
of this hierarchy can introduce an additional source of variability and correlation. The second scenario occurs in
longitudinal studies, where repeated measurements are taken over time. Alternatively, the repeated measures could
be spatial or multivariate in nature.
PROC MIXED provides a variety of covariance structures to handle the previous two scenarios. The most common
of these structures arises from the use of random-effects parameters, which are additional unknown random
variables assumed to impact the variability of the data. The variances of the random-effects parameters, commonly
known as variance components, become the covariance parameters for this particular structure. Traditional mixed
linear models contain both fixed- and random-effects parameters, and, in fact, it is the combination of these two
types of effects that led to the name mixed model. PROC MIXED fits not only these traditional variance component
models but numerous other covariance structures as well.
PROC MIXED fits the structure you select to the data using the method of restricted maximum likelihood (REML),
also known as residual maximum likelihood. It is here that the Gaussian assumption for the data is exploited. Other
SAS PROC MIXED 2
estimation methods are also available, including maximum likelihood and MIVQUE0. The details behind these
estimation methods are discussed in subsequent sections.
Once a model has been fit to your data, you can use it to draw statistical inferences via both the fixed-effects and
covariance parameters. PROC MIXED computes several different statistics suitable for generating hypothesis tests
and confidence intervals. The validity of these statistics depends upon the mean and variance-covariance model you
select, so it is important to choose the model carefully. Some of the output from PROC MIXED helps you assess
your model and compare it with others.
Basic Features
PROC MIXED provides easy accessibility to numerous mixed linear models that are useful in many common
statistical analyses. In the style of the GLM procedure, PROC MIXED fits the specified mixed linear model and
produces appropriate statistics.
Some basic features of PROC MIXED are
• covariance structures, including variance components, compound symmetry, unstructured, AR(1), Toeplitz,
spatial, general linear, and factor analytic
• GLM-type grammar, using MODEL, RANDOM, and REPEATED statements for model specification and
CONTRAST, ESTIMATE, and LSMEANS statements for inferences
• appropriate standard errors for all specified estimable linear combinations of fixed and random effects, and
corresponding t- and F-tests
• subject and group effects that enable blocking and heterogeneity, respectively
• REML and ML estimation methods implemented with a Newton-Raphson algorithm
• capacity to handle unbalanced data
• ability to create a SAS data set corresponding to any table
PROC MIXED uses the Output Delivery System (ODS), a SAS subsystem that provides capabilities for displaying
and controlling the output from SAS procedures. ODS enables you to convert any of the output from PROC MIXED
into a SAS data set. See the "Changes in Output"
section.
Notation for the Mixed Model
This section introduces the mathematical notation used throughout this chapter to describe the mixed linear model.
You should be familiar with basic matrix algebra (refer to Searle 1982). A more detailed description of the mixed
model is contained in the "Mixed Models Theory"
section.
A statistical model is a mathematical description of how data are generated. The standard linear model, as used by
the GLM procedure, is one of the most common statistical models:
In this expression, y represents a vector of observed data,
is an unknown vector of fixed-effects parameters with
known design matrix X, and
is an unknown random error vector modeling the statistical noise around . The
SAS PROC MIXED 3
focus of the standard linear model is to model the mean of y by using the fixed-effects parameters
. The residual
errors
are assumed to be independent and identically distributed Gaussian random variables with mean 0 and
variance
.
The mixed model generalizes the standard linear model as follows:
Here,
is an unknown vector of random-effects parameters with known design matrix Z, and is an unknown
random error vector whose elements are no longer required to be independent and homogeneous.
To further develop this notion of variance modeling, assume that
and are Gaussian random variables that are
uncorrelated and have expectations 0 and variances G and R, respectively. The variance of y is thus
V = ZGZ' + R
Note that, when
and Z = 0, the mixed model reduces to the standard linear model.
You can model the variance of the data, y, by specifying the structure (or form) of Z, G, and R. The model matrix Z
is set up in the same fashion as X, the model matrix for the fixed-effects parameters. For G and R, you must select
some covariance structure. Possible covariance structures include
• variance components
• compound symmetry (common covariance plus diagonal)
• unstructured (general covariance)
• autoregressive
• spatial
• general linear
• factor analytic
By appropriately defining the model matrices X and Z, as well as the covariance structure matrices G and R, you
can perform numerous mixed model analyses.
PROC MIXED Contrasted with Other SAS Procedures
PROC MIXED is a generalization of the GLM procedure in the sense that PROC GLM fits standard linear models,
and PROC MIXED fits the wider class of mixed linear models. Both procedures have similar CLASS, MODEL,
CONTRAST, ESTIMATE, and LSMEANS statements, but their RANDOM and REPEATED statements differ (see
the following paragraphs). Both procedures use the nonfull-rank model parameterization, although the sorting of
classification levels can differ between the two. PROC MIXED computes only Type I -Type III tests of fixed
effects, while PROC GLM offers Types I - IV. The RANDOM statement in PROC MIXED incorporates random
effects constituting the
vector in the mixed model. However, in PROC GLM, effects specified in the RANDOM
statement are still treated as fixed as far as the model fit is concerned, and they serve only to produce corresponding
SAS PROC MIXED 4
expected mean squares. These expected mean squares lead to the traditional ANOVA estimates of variance
components. PROC MIXED computes REML and ML estimates of variance parameters, which are generally
preferred to the ANOVA estimates (Searle 1988; Harville 1988; Searle, Casella, and McCulloch 1992). Optionally,
PROC MIXED also computes MIVQUE0 estimates, which are similar to ANOVA estimates.
The REPEATED statement in PROC MIXED is used to specify covariance structures for repeated measurements on
subjects, while the REPEATED statement in PROC GLM is used to specify various transformations with which to
conduct the traditional univariate or multivariate tests. In repeated measures situations, the mixed model approach
used in PROC MIXED is more flexible and more widely applicable than either the univariate or multivariate
approaches. In particular, the mixed model approach provides a larger class of covariance structures and a better
mechanism for handling missing values (Wolfinger and Chang 1995).
PROC MIXED subsumes the VARCOMP procedure. PROC MIXED provides a wide variety of covariance
structures, while PROC VARCOMP estimates only simple random effects. PROC MIXED carries out several
analyses that are absent in PROC VARCOMP, including the estimation and testing of linear combinations of fixed
and random effects.
The ARIMA and AUTOREG procedures provide more time series structures than PROC MIXED, although they do
not fit variance component models. The CALIS procedure fits general covariance matrices, but it does not allow
fixed effects as does PROC MIXED. The LATTICE and NESTED procedures fit special types of mixed linear
models that can also be handled in PROC MIXED, although PROC MIXED may run slower because of its more
general algorithm. The TSCSREG procedure analyzes time-series cross-sectional data, and it fits some structures not
available in PROC MIXED.
Syntax
The following statements are available in PROC MIXED.
PROC MIXED
< options > ;
BY
variables ;
CLASS variables ;
ID variables ;
MODEL
dependent = < fixed-effects > < / options > ;
RANDOM random-effects < / options > ;
REPEATED < repeated-effect > < / options > ;
PARMS
(value-list) ... < / options > ;
PRIOR
< distribution > < / options > ;
CONTRAST
'label' < fixed-effect values ... >
< | random-effect values ... > , ... < / options > ;
ESTIMATE
'label' < fixed-effect values ... >
< | random-effect values ... >< / options > ;
LSMEANS
fixed-effects < / options > ;
MAKE 'table' OUT=SAS-data-set ;
WEIGHT
variable ;
Items within angle brackets ( < > ) are optional. The CONTRAST, ESTIMATE, LSMEANS, MAKE, and
RANDOM statements can appear multiple times; all other statements can appear only once.
The PROC MIXED and MODEL statements are required, and the MODEL statement must appear after the CLASS
statement if a CLASS statement is included. The CONTRAST, ESTIMATE, LSMEANS, RANDOM, and
REPEATED statements must follow the MODEL statement. The CONTRAST and ESTIMATE statements must
also follow any RANDOM statements.
SAS PROC MIXED 5
Table 41.1
summarizes the basic functions and important options of each PROC MIXED statement. The syntax of
each statement in Table 41.1 is described in the following sections in alphabetical order after the description of the
PROC MIXED statement.
Table 41.1: Summary of PROC MIXED Statements
Statement Description Important Options
PROC
MIXED
invokes the procedure DATA= specifies input data set, METHOD= specifies estimation
method
BY performs multiple PROC
MIXED analyses in one
invocation
none
CLASS declares qualitative variables
that create indicator variables
in design matrices
none
ID lists additional variables to be
included in predicted values
tables
none
MODEL specifies dependent variable
and fixed effects, setting up X
S requests solution for fixed-effects parameters, DDFM= specifies
denominator degrees of freedom method, OUTP= outputs predicted
values to a data set
RANDOM specifies random effects,
setting up Z and G
SUBJECT= creates block-diagonality, TYPE= specifies covariance
structure, S requests solution for random-effects parameters, G
displays estimated G
REPEATED sets up R SUBJECT= creates block-diagonality, TYPE= specifies covariance
structure, R displays estimated blocks of R, GROUP= enables
between-subject heterogeneity, LOCAL adds a diagonal matrix to R
PARMS specifies a grid of initial
values for the covariance
parameters
HOLD= and NOITER hold the covariance parameters or their ratios
constant, PDATA= reads the initial values from a SAS data set
PRIOR performs a sampling-based
Bayesian analysis for
variance component models
NSAMPLE= specifies the sample size, SEED= specifies the starting
seed
CONTRAST constructs custom hypothesis
tests
E displays the L matrix coefficients
ESTIMATE constructs custom scalar
estimates
CL produces confidence limits
LSMEANS computes least squares means
for classification fixed effects
DIFF computes differences of the least squares means, ADJUST=
performs multiple comparisons adjustments, AT changes covariates,
OM changes weighting, CL produces confidence limits, SLICE=
tests simple effects
MAKE converts any displayed table
into a SAS data set
none. Has been superceded by the Output Delivery System (ODS)
WEIGHT specifies a variable by which
to weight R
none
剩余79页未读,继续阅读
loveseeking
- 粉丝: 0
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 基于嵌入式ARMLinux的播放器的设计与实现 word格式.doc
- 经典:大学答辩通过_基于ARM微处理器的嵌入式指纹识别系统设计.pdf
- 嵌入式系统课程设计.doc
- 基于飞思卡尔控制器的智能寻迹车设计ARM基础课程课程设计.doc
- 下载基于ARM7的压电陶瓷换能器导纳圆测量仪的研制PDF格式可编辑.pdf
- 课程设计基于ARM的嵌入式家居监控系统的研究与设计.doc
- 论文基于嵌入式ARM的图像采集处理系统设计.doc
- 嵌入式基于ARM9的中断驱动程序设计—课程设计.doc
- 在Linux系统下基于ARM嵌入式的俄罗斯方块.doc
- STK-MirrorStore Product Release Notes(96130)-44
- STK-MirrorStore Storage Connectivity Guide for StorageTek Disk A
- 龙虾养殖远程监控系统的设计与实现数据采集上位-机软件模块-本科毕业设计.doc
- 龙虾养殖远程监控系统的设计与实现数据采集上位-机软件模块-.doc
- 龙虾养殖远程监控系统的设计与实现数据采集上位-机软件模块-本科生毕业论文.doc
- 麻阳风貌展示网站的设计与实现毕业论文.pdf
- 高速走丝气中电火花线切割精加工编程设计.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功