您好,欢迎访问三七文档
第6章、非线性回归前面所学的多元线性回归,假定被解释变量与解释变量之间是线性关系。本章的非线性回归,就放松了这个假定。例如:CES生产函数(constantelasticityofsubstitution)(1)yKL§1、可以线性化的非线性回归模型1、本质上是线性回归模型的非线性回归模型原模型变换模型1yabx'1/,'yyxxyabx2','yyxx2yabxcx222','yyxxlnyabx'lnxx23yabxcxdx22323',','yyxxxxbyax12'ln,'ln,ln,yyxxabbxyae12'ln,',ln,yyxxab3(1)xykae1/31/31/312',',,xyyxekak例子:我们已经多次接触的CD函数。yALKlnlnlnlnyALKEviews:lslog(x)clog(l1)log(k1)DependentVariable:LOG(X)Method:LeastSquaresDate:11/11/04Time:20:30Sample:19291967Includedobservations:39VariableCoefficientStd.Errort-StatisticProb.C-3.9377140.236999-16.614880.0000LOG(L1)1.4507860.08322817.431370.0000LOG(K1)0.3838080.0480187.9930350.0000R-squared0.994627Meandependentvar5.687449AdjustedR-squared0.994329S.D.dependentvar0.460959S.E.ofregression0.034714Akaikeinfocriterion-3.809542Sumsquaredresid0.043382Schwarzcriterion-3.681576Loglikelihood77.28607F-statistic3332.181Durbin-Watsonstat0.858080Prob(F-statistic)0.000000或者:先转化为新的序列,然后对新的序列进行多元线性回归。seriesy=log(x)seriesx1=log(l1)seriesx2=log(k1)lsycx1x2两种方法得到的结果是一样的。DependentVariable:YMethod:LeastSquaresDate:11/11/04Time:20:32Sample:19291967Includedobservations:39VariableCoefficientStd.Errort-StatisticProb.C-3.9377140.236999-16.614880.0000X11.4507860.08322817.431370.0000X20.3838080.0480187.9930350.0000R-squared0.994627Meandependentvar5.687449AdjustedR-squared0.994329S.D.dependentvar0.460959S.E.ofregression0.034714Akaikeinfocriterion-3.809542Sumsquaredresid0.043382Schwarzcriterion-3.681576Loglikelihood77.28607F-statistic3332.181Durbin-Watsonstat0.858080Prob(F-statistic)0.0000002、Taylor级数展开法例子:CES生产函数(constantelasticityofsubstitution)《EconometricsAnalysis》P397(1)yKL取对数有lnlnln(1)yKL在0处Taylor展开,得到21211223344lnlnln(1)ln(1){(lnln)}yKLKLxxxx此处1234ln,,(1),(1)21123421,ln,ln,(lnln)xxKxLxKL因此,得到12232342323,/(),,()/()e对新方程进行多元线性回归即可。§2、非线性回归模型1、非线性最小二乘法假设描述被解释变量和解释变量关系的回归方程为(,)tttyfx此处f(.,.)是tx和的函数,其中1(,...,)ttKtxxx是t时的K个解释变量数据;是未知的待估计的参数。线性回归是非线性回归的特例:tttyx(回忆一下数据矩阵X和y怎样写?)回归模型是线性的,如果被解释变量关于的导数与系数无关;回归模型是非线性的,若被解释变量关于的导数与系数有关。比如,下面两个模型那个是线性的,那个是非线性的:123logloglogttttyLK321ttttyLK残差平方和:2()((,))tttSyfx非线性最小二乘法(nonlinearleastsquareestimator,NLS):选择参数向量最小化残差平方和min()S一般情况下,很难求解上面极值问题。不过,我们也不必一定将表示为y和x的函数,我们的兴趣在于得到的具体数值。使用迭代算法,可以求得最优解。以上极值问题的一阶条件为(,)()2((,))0ttttfbSbyfbbbxx注意(,)tfbbx是K×1列向量,2的一致估计为221((,))tttsyfbnKxb的样本协方差矩阵为1'''112''(,)(,)()()(,)(,)()()nnfbfbbbVsfbfbbbxxxx非线性回归方程的确定系数2R定义为2221()tttteRyy注意确定系数现在只是个描述性统计量,2[0,1]R不一定成立。2、使用Eview实现非线性回归例1:CD生产函数yALKstep1,双击数据文件step2,选择Object/NewObject/Equation,输入X=C(1)*L1^C(2)*K1^C(3)DependentVariable:XMethod:LeastSquaresDate:11/11/04Time:21:39Sample:19291967Includedobservations:39Convergenceachievedafter8iterationsX=C(1)*L1^C(2)*K1^C(3)CoefficientStd.Errort-StatisticProb.C(1)0.0342030.0107243.1894060.0030C(2)1.2692200.09798512.953220.0000C(3)0.4697420.0477819.8312190.0000R-squared0.995648Meandependentvar325.9436AdjustedR-squared0.995407S.D.dependentvar143.0171S.E.ofregression9.693011Akaikeinfocriterion7.454491Sumsquaredresid3382.361Schwarzcriterion7.582457Loglikelihood-142.3626F-statistic4118.301Durbin-Watsonstat0.843533Prob(F-statistic)0.000000点击resid观察回归效果。-20-1001020304002004006008003035404550556065ResidualActualFitted请与多元线性回归的结果进行比较:lslog(x)clog(l1)log(k1)DependentVariable:LOG(X)Method:LeastSquaresDate:11/11/04Time:21:40Sample:19291967Includedobservations:39VariableCoefficientStd.Errort-StatisticProb.C-3.9377140.236999-16.614880.0000LOG(L1)1.4507860.08322817.431370.0000LOG(K1)0.3838080.0480187.9930350.0000R-squared0.994627Meandependentvar5.687449AdjustedR-squared0.994329S.D.dependentvar0.460959S.E.ofregression0.034714Akaikeinfocriterion-3.809542Sumsquaredresid0.043382Schwarzcriterion-3.681576Loglikelihood77.28607F-statistic3332.181Durbin-Watsonstat0.858080Prob(F-statistic)0.000000请问:C和C(1)相同吗?可以直接比较残差平方和吗?点击resid观察回归效果。-0.10-0.050.000.050.100.154.55.05.56.06.53035404550556065ResidualActualFitted例2:CES生产函数(1)yKL取对数有lnlnln(1)yKL请问:如何写出非线性回归表达式,如何在Eviews中实施非线性回归。DependentVariable:LOG(X)Method:LeastSquaresDate:11/11/04Time:22:37Sample:19291967Includedobservations:39Convergenceachievedafter1iterationsLOG(X)=C(1)+C(2)*LOG(C(3)*K1^C(4)+(1-C(3))*L1^C(4))CoefficientStd.Errort-StatisticProb.C(1)-3.8395840.252774-15.189780.0000C(2)1.0580150.9914821.0671050.2932C(3)0.3844040.1872502.0528930.0476C(4)1.7281731.6170181.0687410.2925R-squared0.994813Meandependentvar5.687449AdjustedR-squared0.994368S.D.dependentvar0.460959S.E.ofregression0.034593Akaikeinfocriterion-3.793411Sumsquaredresid0.041884Schwarzcriterion-3.622789Loglikelihood77.97151F-statistic2237.432Durbin-Watsonstat0.931976Prob(F-statistic)0.0000003、需要注意的问题回归方程必须写出y=f(X,b)的形式,即被解释变量必须放在左边。option中系数的初始取值为“startingcoefficientvalues”,可以更改。停止迭代的原则:迭代次数和收敛水平。可以更改。§3、非线性回归的统计推断1、非线性
本文标题:第6章非线性回归
链接地址:https://www.777doc.com/doc-2197882 .html