资源预览内容
第1页 / 共24页
第2页 / 共24页
第3页 / 共24页
第4页 / 共24页
第5页 / 共24页
第6页 / 共24页
第7页 / 共24页
第8页 / 共24页
亲,该文档总共24页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
广义线性模型Generalized linear model,1,课件优选,明确两个概念:,线性模型(linear model),也称经典线性模型(classical linear model)或一般线性模型(general linear model, GLM)。 广义线性模型(generalized linear model,GENMOD)是一般线性模型的直接推广,由Nelder & Wedderburn(1972)首先提出。,2,课件优选,SAS软件中的PROC GLM:,PROC GLM analyzes data within the framework of general linear models. PROC GLM handles models relating one or several continuous dependent variables to one or several independent variables. The independent variables may be either classification variables or continuous variables. Thus, the GLM procedure can be used for many different analyses, including simple regression multiple regression analysis of variance (ANOVA), especially for unbalanced data analysis of covariance response-surface models (响应面模型) weighted regression polynomial regression (多项式回归) partial correlation multivariate analysis of variance (MANOVA) repeated measures analysis of variance,3,课件优选,The GENMOD Procedure The GENMOD procedure fits generalized linear models. The class of generalized linear models is an extension of traditional linear models that allows the mean of a population to depend on a linear predictor through a nonlinear link function and allows the response probability distribution to be any member of an exponential family of distributions. Many widely used statistical models are generalized linear models. These include classical linear models with normal errors, logistic and probit models for binary data, and log-linear models for multinomial data. Many other useful statistical models can be formulated as generalized linear models by the selection of an appropriate link function and response probability distribution.,SAS软件中的PROC GENMOD:,4,课件优选,一、何为“广义线性模型”?,广义线性模型(generalized linear model)由Nelder & Wedderburn(1972)首先提出,是一般线性模型的直接推广,它使因变量的总体均值通过一个非线性连接函数(link function)而依赖于线性预测值,同时还允许响应概率分布为指数分布族中的任何一员。许多广泛应用的统计模型均属于广义线性模型,如logistic回归模型、Probit回归模型、Poisson回归模型、负二项回归模型等。,5,课件优选,指数分布族的概率密度(概率函数)可表示为:,其中,和为两个参数, 称为自然参数, 为离散参数;a、b、c为函数。,6,课件优选,7,课件优选,一个广义线性模型包括以下三个组成部分: (1)线性成分(linear component ) : (2)随机成分(random component ): (3)连接函数 ( link function): 连接函数为一单调可微(连续且充分光滑)的函数。,何为“广义线性模型”?(续),8,课件优选,9,课件优选,SAS9.0 GENMOD过程中所整合的响应变量分布类型,10,课件优选,广义线性模型在两个方面对经典线性模型进行了推广: (1)一般线性模型中要求因变量是连续的且服从正态分布,在广义线性模型中,因变量的分布可扩展到非连续的资料,如二项分布、Poisson分布、负二项分布等。 (2)一般线性模型中,自变量的线性预测值就是因变量的估计值,而广义线性模型中,自变量的线性预测值是因变量的函数估计值。,何为“广义线性模型”?(续),11,课件优选,包括:多元线性回归模型 logistic回归模型 Probit回归模型 Poisson回归模型 负二项回归模型 ,广义线性模型的一般形式:,何为“广义线性模型”?(续),12,课件优选,Generalized linear models(广义线性模型),Family of regression models Outcome variable determines choice of model Uses Control of confounding Model building, risk prediction,Outcome Model ContinuousLinear regression BinomialLogistic regression SurvivalCox model CountsPoisson regression,13,课件优选,二、广义线性模型的参数估计,广义线性模型的参数估计一般不能用最小二乘估计,常用加权最小二乘法(weighted least squared, WLS)或最大似然法(maximum likelihood)估计。 各回归系数需用迭代方法求解。 求得 后,用下式估计:,14,课件优选,二、广义线性模型的参数估计(续),15,课件优选,Log-likelihood functions,16,课件优选,Log-likelihood functions,17,课件优选,Log-likelihood functions,18,课件优选,Log-likelihood functions,19,课件优选,三、广义线性模型的假设检验,广义线性模型的检验一般用似然比检验、Wald检验和记分检验。模型的比较用似然比检验。 (1)似然比检验:似然比检验是通过比较两个相嵌套模型(如模型P嵌套于模型K内)的对数似然函数来进行的,其统计量G为:,其中,模型P中的自变量是模型K中自变量的一部分,另一部分就是要检验的变量。这里G服从自由度为K-P的2分布。,20,课件优选,Likelihood ratio statistic(似然比统计量),Compares two nested models g() = + 1x1 + 2x2 + 3x3 + 4x4 (model 1) g() = + 1x1 + 2x2 (model 2) LR statistic -2 log (likelihood model 2 / likelihood model 1) = -2 log (likelihood model 2) -2log (likelihood model 1) LR statistic is a 2 with DF = number of extra parameters in model,三、广义线性模型的假设检验 (1)似然比检验(续),21,课件优选,三、广义线性模型的假设检验(续),(2)回归系数的Wald检验: Wald检验是通过比较估计系数与0的差别来进行的,其检验统计量为: 或,这里,z为标准正态变量。参数的可信区间如下计算:,22,课件优选,三、广义线性模型的假设检验(续),(3)比分(Score)检验: 以未包含 某个或某几个变量的模型为基础,保留模型中参数的估计值,并假设新增加的参数之系数为0,计算似然函数的一阶偏导数(又称有效比分)及信息矩阵,两者相乘即为比分检验统计量S。当样本含量较大时,S的分布近似服从2分布,自由度为检验的参数个数。,23,课件优选,对于广义线性模型,通常用下面两种统计量度量模型的拟合优度。 (1) 偏差统计量(Deviance) (2) 广义 Pearson 2统计量( Pearsons chi-square statistic) (3) 伪R2统计量(Pseudo-R2 ) (4) AIC、AICC、BIC、CAIC,四、广义线性模型的拟合优度,24,课件优选,
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号