This function generates data using a linear regression model with size of n. Then one of the independent variables is contaminated by adding measurement errors. Another independent variable can be included in model.
generate.eive.data(n, e.sd, delta.sd, seed = 12345, useotherx = FALSE)
Number of observations.
Standard deviation of error term of regression.
Standard deviation of measurement error.
Random number seed. By default, it is 12345.
Boolean variable. If it is TRUE, another variable will be created with no errors. By default, it is FALSE.
Returns a matrix of contaminated variable, other variable (if exists) and independent variable in its columns.