当前位置:文档之家› 应用技术回归分析第九章部分完整答案

应用技术回归分析第九章部分完整答案

第9章 非线性回归9.1 在非线性回归线性化时,对因变量作变换应注意什么问题?答:在对非线性回归模型线性化时,对因变量作变换时不仅要注意回归函数的形式, 还要注意误差项的形式。

如:(1) 乘性误差项,模型形式为e y AK L αβε=, (2) 加性误差项,模型形式为y AK L αβε=+。

对乘法误差项模型(1)可通过两边取对数转化成线性模型,(2)不能线性化。

一般总是假定非线性模型误差项的形式就是能够使回归模型线性化的形式,为了方便通常省去误差项,仅考虑回归函数的形式。

9.2为了研究生产率与废料率之间的关系,记录了如表9.14所示的数据,请画出散点图,根据散点图的趋势拟合适当的回归模型。

表9.14生产率x (单位/周) 1000 2000 3000 3500 4000 4500 5000 废品率y (%)5.26.56.88.110.2 10.3 13.0解:先画出散点图如下图:5000.004000.003000.002000.001000.00x12.0010.008.006.00y从散点图大致可以判断出x 和y 之间呈抛物线或指数曲线,由此采用二次方程式和指数函数进行曲线回归。

(1)二次曲线 SPSS 输出结果如下:Mode l Sum mary.981.962.942.651R R SquareAdjusted R SquareStd. E rror of the E stim ateThe independent variable is x.ANOVA42.571221.28650.160.0011.6974.42444.2696Regression Residual TotalSum of Squares dfMean SquareF Sig.The independent variable is x.Coe fficients-.001.001-.449-.891.4234.47E -007.0001.4172.812.0485.843 1.3244.414.012x x ** 2(Constant)B Std. E rror Unstandardized Coefficients BetaStandardizedCoefficientstSig.从上表可以得到回归方程为:72ˆ 5.8430.087 4.4710yx x -=-+⨯ 由x 的系数检验P 值大于0.05,得到x 的系数未通过显著性检验。

由x 2的系数检验P 值小于0.05,得到x 2的系数通过了显著性检验。

(2)指数曲线Mode l Sum mary.970.941.929.085RR SquareAdjusted R SquareStd. E rror of the E stim ateThe independent variable is x.ANOVA.5731.57379.538.000.0365.007.6096Regression Residual TotalSum of SquaresdfMean SquareF Sig.The independent variable is x.Coe fficients.000.000.9708.918.0004.003.34811.514.000x(Constant)B Std. E rror Unstandardized Coefficients BetaStandardizedCoefficientstSig.The dependent variable is ln(y).从上表可以得到回归方程为:0.0002t ˆ 4.003ye 由参数检验P 值≈0<0.05,得到回归方程的参数都非常显著。

从R 2值,σ的估计值和模型检验统计量F 值、t 值及拟合图综合考虑,指数拟合效果更好一些。

9.3 已知变量x与y的样本数据如表9.15,画出散点图,试用αeβ/x来拟合回归模型,假设:(1)乘性误差项,模型形式为y=αeβ/x eε(2)加性误差项,模型形式为y=αeβ/x+ε。

表9.15序号x y 序号x y 序号x y1 4.20 0.086 6 3.20 0.150 11 2.20 0.3502 4.06 0.090 7 3.00 0.170 12 2.00 0.4403 3.80 0.100 8 2.80 0.190 13 1.80 0.6204 3.60 0.120 9 2.60 0.220 14 1.60 0.9405 3.40 0.130 10 2.40 0.240 15 1.40 1.620解:散点图:(1)乘性误差项,模型形式为y=αeβ/x eε线性化:lny=lnα+β/x +ε令y1=lny, a=lnα,x1=1/x .做y1与x1的线性回归,SPSS 输出结果如下:Model Summ aryb.999a .997.997.04783Model 1RR SquareAdjusted R SquareStd. E rror of the EstimateP redictors: (Constant), x1a. Dependent Variable: y1b. ANOVA b10.930110.9304778.305.000a.03013.00210.96014Regression Residual TotalModel 1Sum of Squares dfMean SquareF Sig.P redictors: (Constant), x1a. Dependent Variable: y1b. Coe fficientsa -3.856.037-103.830.0006.080.088.99969.125.000(Constant)x1Model1B Std. E rror Unstandardized Coefficients BetaStandardizedCoefficientstSig.Dependent Variable: y1a.从以上结果可以得到回归方程为:y1=-3.856+6.08x1F 检验和t 检验的P 值≈0<0.05,得到回归方程及其参数都非常显著。

回代为原方程为:y=0.021e6.08/x(2)加性误差项,模型形式为y=αeβ/x+ε不能线性化,直接非线性拟合。

给初值α=0.021,β=6.08(线性化结果),NLS 结果如下:Parameter E stimates.021.001.020.0236.061.0445.9656.157P aram etera b E stim ateStd. E rrorLow er Bound Upper Bound95% Confidence I ntervalANOVA a4.4582 2.229.00113.0004.459152.46714Source Regression ResidualUncorrected Total Corrected TotalSum of SquaresdfMean SquaresDependent variable: yR squared = 1 - (Residual Sum of Squares) /(Corrected Sum of Squares) = 1.000.a.从以上结果可以得到回归方程为: y=0.021e 6.061/x根据R 2≈1,参数的区间估计不包括零点且较短,可知回归方程拟合非常好,且其参数都显著。

9.4 Logistic 回归函数常用于拟合某种消费品的拥有率,表8.17(书上239页,此处略)是北京市每百户家庭平均拥有的照相机数,试针对以下两种情况拟合Logistic 回归函数。

0111t y b b u=+(1)已知100u =,用线性化方法拟合,(2)u 未知,用非线性最小二乘法拟合。

根据经济学的意义知道,u 是拥有率的上限,初值可取100;b0>0,0<b1<1初值请读者自己选择。

解:(1),100u =时,的线性拟合。

对0111t y b b u=+函数线性化得到:11ln() 1.8510.264100y -=--0111ln()ln ln 100b t b y -=+,令311ln()100y y =-,作3y 关于t 的线性回归分析,SPSS 输出结果如下:Model Summ aryb.994a .988.987.16820Model 1RR SquareAdjusted R SquareStd. E rror of the EstimateP redictors: (Constant), t a. Dependent Variable: y3b.ANOVA b39.839139.8391408.165.000a.48117.02840.32018Regression Residual TotalModel 1Sum of Squares dfMean SquareF Sig.P redictors: (Constant), t a. Dependent Variable: y3b.Coe fficientsa -1.851.080-23.039.000-.264.007-.994-37.526.000(Constant)tModel1B Std. E rror Unstandardized Coefficients BetaStandardizedCoefficientstSig.Dependent Variable: y3a.由表Model Summary 得到,0.994R =趋于1,回归方程的拟合优度好,由表ANOVA 得到回归方程显著,由Coefficients 表得到,回归系数都是显著的,得到方程:11ln() 1.8510.264100y -=--,进一步计算得到:00.157b =,10.768b =(100u =)回代变量得到最终方程形式为: 1ˆ0.010.1570.768ty=+⨯ 最后看拟合效果,通过sequence 画图:由图可知回归效果比较令人满意。

(2)非线性最小二乘拟合,取初值100u =,00.157b =,10.768b =: 一共循环迭代8次,得到回归分析结果为:Parameter E stimates91.062 2.03586.74795.377.211.028.152.271.727.012.701.753P aram eteru b c E stim ate Std. E rrorLow er Bound Upper Bound95% Confidence I ntervalANOVA a60774.331320258.11085.36916 5.33660859.7001915690.38618Source Regression Residual Uncorrected TotalCorrected Total Sum ofSquares df MeanSquaresDependent variable: yR squared = 1 - (Residual Sum of Squares) /(Corrected Sum of Squares) = .995.a.0.995R =>0.994,得到回归效果比线性拟合要好,且:91.062u =,00.211b =,10.727b =,回归方程为:110.211*0.72791.062ty =+。

相关主题