资源简介

在建立线性回归模型时,如果样本变量是非正态分布的,需要采用适当的变换方法进行处理,使之服从或接近于正态分布。

资源截图

代码片段和文件信息

function v=boxcox(xlamdaxdot)
%Syntax: v=boxcox(xlamdaxdot)
%______________________________
%
% Makes the Box-Cox transformation of a data set x.
%
% v is the transformed data vector.
% x is the data set.
% lamda is the parameter of the transformation.
% xdot is the geometric mean of the data.
%
% Alexandros Leontitsis
% Institute of Mathematics and Statistics
% University of Kent at Canterbury
% Canterbury
% Kent CT2 7NF
% U.K.
% University e-mail: al10@ukc.ac.uk (until December 2001)
% Lifetime e-mail: leoaleq@yahoo.com
% Homepage: http://www.geocities.com/CapeCanaveral/Lab/1421
%
% June 15 2001.

if nargin<1 | isempty(x)==1
   error(‘You shoud provide a data set

评论

共有 条评论