matlab实现线性戴明回归

收录时间:2020-09-21
资源分类:Matlab 工具:MATLAB 7.7 (R2008b)

matlab实现线性戴明回归

Linear Deming Regression

[ b sigma2_x x_est y_est stats] = deming(x,y,lambda,alpha)

 

deming() performs a linear Deming regression to find the linear coefficients:

                    y = b(1) + b(2)*x

under the assumptions that x and y *both* contain measurement error with measurement error variance related as lambda = sigma2_y/sigma2_x (sigma2_x and sigma2_y is the measurement error variance of the x and y variables, respectively).

 

Computations are performed as described by Anders Christian Jenson in a May 2007 description of the Deming regression function for MethComp (web: http://staff.pubhealth.ku.dk/~bxc/MethComp/Deming.pdf), which includes a nice derivation of the slope, intercept, variance, and (x,y) estimates.

 

Inputs:

  x - [Nx1] Measured data w/ error

  y - [Nx1] Measured data w/ error

  lambda - [1x1] [OPTIONAL] Relationship between measurement error expressed as ratio: sigma2_y / sigma2_x (default = 1)

  alpha - [1x1] [OPTIONAL] Confidence level (default = 0.05)

 

Outputs:

  b - [2x1] Intercept (1) and slope (2)

  sigma2_x - [1x1] Error variance. Note: sigma2_y = lambda*sigma2_x

  x_est - [Nx1] Estimated x values

  y_est - [Nx1] Estimated y values

  stats - [STR] Additional statistical information

      .s_e - Standard error of regression estimate

      .s_b - Jacknife estimate of the standard error of the slope and intercept

      .t_c - *Critical t-value used for confidence intervals

      .b_ci - *Confidence interval for slope and intercept

 

*stats.b_ci and stats.t_c are only available if the statistics package is installed and/or the tinv function is available.

 

Example is available by typing "help deming" at the command line.

文件下载列表
deming.zip (3.97KB)  
附件内容(只显示2中的1个)
deming.m  
更多

目前尚无评论

用户反馈   关于我们
Copyright (©) ZHIHUISHI.COM 2013 All Rights Reserved.
京ICP备18060134号-3