圣象地板logo高清:idl中回归分析和相关系数 - 梁子的日志2 - 网易博客
idl中回归分析和相关系数
默认分类 2010-06-19 11:04:00 阅读63 评论0 字号:大中小 订阅
1.idl中计算回归是采用regress函数
The REGRESS function performs a multiple linear regression fit and returns an Nterm-element column vector of coefficients.
REGRESS fits the function:
yi = const + a0x0, i + a1x1, i + ... + aNterms-1xNterms-1, i
也就是该函数可以进行多元的回归分析
Result = REGRESS( X, Y, [, CHISQ=variable] [, CONST=variable] [, CORRELATION=variable] [, /DOUBLE] [, FTEST=variable] [, MCORRELATION=variable] [, MEASURE_ERRORS=vector] [, SIGMA=variable] [, STATUS=variable] [, YFIT=variable] )
利用多项式拟合也可求出ploy_fit主要是一元的,可以多次
linfit和ladfit是一元一次的拟合
LinFit:The LINFIT function fits the paired data {xi, yi} to the linear model, y = A+ Bx, by minimizing the chi-square error statistic.LadFit:The LADFIT function fits the paired data {xi, yi} to the linear model, y = A+ Bx, using a "robust" least absolute deviation method.
2.idl中计算相关系数person
函数是correlate
The CORRELATE function computes the linear Pearson correlation coefficient of two vectors or the correlation matrix of an m x n array. Alternatively, this function computes the covariance of two vectors or the covariance matrix of an m x n array
Result = CORRELATE( X [, Y] [, /COVARIANCE] [, /DOUBLE] )
3.matlab计算相关系数
matlab中有个函数可以计算相关系数corrcoef()函数
这个函数还可以计算p值。
4.p_correlate和m_correlate
偏相关和复相关分析