1、岭回归在财政收入中的应用信息与计算科学 2003 级 母培松指导老师 杜世平 副教授摘要:本论文介绍了岭回归的统计学原理和方法,阐述了岭回归和最小偏二乘法的差别和关系,总结了评价岭回归的 EMBED Equation.DSMT4 效应的性质和其确定方法,讨论了岭回归在经济领域中的具体应用,并用matlab 软件来实现计算程序。关键词:岭回归,岭迹,病态矩阵,有偏估计Ridge regression return for revenueMu Peisong Information and Computational Science, Grade 2003 Directed by Du shipi
2、ng(Associate Professor) Abstract : This paper introduced the ridge regression statistical theory and methods, Described the differences and relationships in the ridge regression and the partial least two multiplication , Raised ridge Regression evaluation of the k effect of nature and its method, Mo
3、re detailed discussions on the ridge regression in the economic field the specific application, using Matlab software to achieve program. Keywords : Ridge Regression, Ridge Trace, Pathological Matrix ,Biased Estimate 1 引言在回归分析中最小二乘法是最常用的方法,使用最小二乘法的一个前提是 EMBED Equation.DSMT4 不为零,即矩阵 EMBED Equation.3
4、非奇异,当所有变量之间有较强的线性相关性时 EMBED Equation.DSMT4 EMBED Equation.DSMT4 ,或者变量之间的数据变化比较小或者部分变量之间有线性相关性时,矩阵的行列式 EMBED Equation.DSMT4 比较小,甚至趋近于 0,一般在实际应用中处理:当 EMBED Equation.DSMT4 EMBED Equatio n.DSMT4 10breakelsecontinueendendfor l=1:6if C(l,l)=10kChold onbreakelseendendend程序 5 岭回归f=inv(z*z+0.0199.*eye(6)*z*y
5、;%岭回归cc=inv(z*z+0.0199.*eye(6);b1(1,1)=mean(y);for i=2:7b1(i,1)=f(i-1,1);endb1for i=1:6by(i+1,1)=f(i,1)/qx(1,i);%还原ends=0;for i=1:6s=s+by(i+1,1)*ax(1,i);endby(1,1)=mean(y)-s;by%计算岭回归s,qs=0;for i=1:24Y(i,1)=by(1,1)+by(2,1)*x(i,1)+by(3,1)*x(i,2)+by(4,1)*x(i,3)+by(5,1)*x(i,4)+by(6,1)*x(i,5)+by(7,1)*x(i
6、,6);s=s+(y(i,1)-Y(i,1)2;endq=sss=q/17sb=ss*(cc(1,1)+cc(2,2)+cc(3,3)+cc(4,4)+cc(5,5)+cc(6,6)程序 6 绘岭图k=0;for j=1:10001f=inv(z*z+k.*eye(6)*z*y;%岭回归cc=inv(z*z+k.*eye(6);b1(1,1)=mean(y);for i=2:7b1(i,1)=f(i-1,1);endfor i=1:6by(i+1,1)=f(i,1)/qx(1,i);%还原ends=0;for i=1:6s=s+by(i+1,1)*ax(1,i);endby(1,1)=mean
7、(y)-s;aa(j,1)=k;k=k+0.0001;m1(j,1)=by(2,1);m2(j,1)=by(3,1);m3(j,1)=by(4,1);m4(j,1)=by(5,1);m5(j,1)=by(6,1);m6(j,1)=by(7,1);endplot(aa,m1,R-,aa,m2,G-,aa,m3,B-,aa,m4,y-,aa,m5,m-,aa,m6,K-)程序7 岭岭分析k=0.00;for j=1:11f=inv(z*z+k.*eye(6)*z*y;%岭回归cc=inv(z*z+k.*eye(6);b1(1,1)=mean(y);jfor i=2:7b1(i,1)=f(i-1,1
8、);endfor i=1:6by(i+1,1)=f(i,1)/qx(1,i);%还原ends=0;for i=1:6s=s+by(i+1,1)*ax(1,i);endby(1,1)=mean(y)-s;by%计算岭回归 s,qs=0;for i=1:24Y(i,1)=by(1,1)+by(2,1)*x(i,1)+by(3,1)*x(i,2)+by(4,1)*x(i,3)+by(5,1)*x(i,4)+by(6,1)*x(i,5)+by(7,1)*x(i,6);s=s+(y(i,1)-Y(i,1)2;endq=sss=q/17sb=ss*(cc(1,1)+cc(2,2)+cc(3,3)+cc(4,4)+cc(5,5)+cc(6,6)k=k+0.0001;endPAGE PAGE 13 *JimiSoft: Unregistered Software ONLY Convert Part Of File! Read Help To Know How To Register.*