Estimate the Correlated-Bivariate-Least Square regression (CBLS) for all potential solutions from =-1 to =1, in a (M,D) plot. This function is analogous to FullCIs.XY
estimating all the BLS regressions from OLSv to OLSh in a (X,Y) plot.
FullCIs.MD(data = NULL, xcol = 1, ycol = 2,
conf.level = 0.95, npoints = 1000, nlambdas = 13)
a data set (data frame or matrix).
a numeric vector to specify the X column(s) or a character vector with the column names.
a numeric vector to specify the Y column(s) or a character vector with the column names.
a numeric value for the confidence level (expressed between 0 and 1).
an integer (at least 10) for the number of points to smooth the hyperbolic curves.
an integer for the number of intermediate CBLS regressions (the two extreme CBLS are calculated by default).
A CIs.MD class object, a list including the following elements:
a table with the X and Y data (means of the replicated data if replicated), their means and differences.
an array of dimension [npoints
, 2 (intercept and slope), nlambdas
+ 2] with the coordinates of all the joint confidence intervals (confidence region, ellipses) from = -1 to = 1.
a table (nlambdas
+ 2 rows) with all the slopes estimates and their approximate confidence intervals and pvalue (slope = 0).
a table (nlambdas
+ 2 rows) with all the intercepts estimates and their approximate confidence intervals and pvalue (intercept = 0).
a table (nlambdas
+ 2 rows) with all the pvalues of the joint hypothesis (slope = 0 and intercept = 0).
an array of dimension [npoints
, 6 (X values, Y predictions, confidence interval and confidence bands), nlambdas
+ 2] with the hyperbolic confidence interval and confidence bands.
The data argument is mandatory. This function is especially useful for unreplicated data with unknown (related to , the ratio of the measurement error variances), as it calculates all the potential solutions. The different estimated regression lines are provided with the different confidence intervals.
Francq BG, Govaerts BB. How to regress and predict in a Bland-Altman plot? Review and contribution based on tolerance intervals and correlated-errors-in-variables models. Statistics in Medicine, 2016; 35:2328-2358.
# NOT RUN {
library(BivRegBLS)
data(Aromatics)
res.full=FullCIs.MD(data=Aromatics,xcol=3,ycol=4)
# }
Run the code above in your browser using DataLab