# tls: Fitting error-in-variables models via total least squares. In tls: Tools of Total Least Squares in Error-in-Variables Models

## Description

It can be used to carry out regression models that account for measurement errors in the independent variables.

## Usage

 ```1 2``` ```tls(formula, data, method = c("normal", "bootstrap"), conf.level = 0.95, ...) ```

## Arguments

 `formula` an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. `data` an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. `method` method for computing confidence interval `conf.level` the confidence level for confidence interval. `...` Optional arguments for future usage.

## Details

This function should be used with care. Confidence interval estimation is given by normal approximation or bootstrap. The normal approximation and bootstrap are proper when all the error terms are independent from normal distribution with zero mean and equal variance (see the references for more details).

## Value

`tls` returns parameters of the fitted model including estimations of coefficient, corresponding estimated standard errors and confidence intervals.

Yan Li

## References

• Gleser, Estimation in a Multivariate "Errors in Variables" Regression Model: Large Sample Results, 1981, Ann. Stat.

• Golub and Laon, An Analysis of the Total Least Squares Problem, 1980, SIAM J. Numer. Anal.

• Pesta, Total least squares and bootstrapping with applications in calibration, 2012, Statistics.

## Examples

 ```1 2 3 4 5 6 7 8 9``` ```library(tls) set.seed(100) X.1 <- sqrt(1:100) X.tilde.1 <- rnorm(100) + X.1 X.2 <- sample(X.1, size = length(X.1), replace = FALSE) X.tilde.2 <- rnorm(100) + X.2 Y <- rnorm(100) + X.1 + X.2 data <- data.frame(Y = Y, X.1 = X.tilde.1, X.2 = X.tilde.2) tls(Y ~ X.1 + X.2 - 1, data = data) ```

tls documentation built on May 2, 2019, 3:59 a.m.