perturb: Perturbation

View source: R/perturb.R

perturbR Documentation

Perturbation

Description

The function modifies a set of quantitative data.

Usage

perturb(x, mu, dv, tol = 0.01)

Arguments

x

A numeric quantitative vector.

mu

Any real number.

dv

Any real positive number.

tol

A value between 0 and 1. By default tol=0.01.

Details

The vector of data set is modified a tol% by following the procedure presented by Belsley (1982).

Value

The vector x modified a tol%.

Author(s)

R. Salmerón (romansg@ugr.es) and C. García (cbgarcia@ugr.es).

References

D. Belsley (1982). Assessing the presence of harmfull collinearity and other forms of weak data throught a test for signal-to-noise. Journal of Econometrics, 20, 211-253.

L. R. Klein and A.S. Goldberger (1964). An economic model of the United States, 1929-1952. North Holland Publishing Company, Amsterdan.

H. Theil (1971). Principles of Econometrics. John Wiley & Sons, New York.

See Also

perturb.n.

Examples

# Henri Theil's textile consumption data modified
data(theil)
head(theil)
consume.p1 = perturb(theil[,2], 3, 4, 0.01)
consume.p2 = perturb(theil[,2], 50, 10, 0.01)
x = cbind(theil[,2], consume.p1, consume.p2)
head(x)

# Klein and Goldberger data on consumption and wage income
data(KG)
head(KG)
farm.income.p1 = perturb(KG[,4], -3, 40, 0.01)
farm.income.p2 = perturb(KG[,4], 10, 8, 0.01)
x = cbind(KG[,4], farm.income.p1, farm.income.p2)
head(x)

multiColl documentation built on July 21, 2022, 9:06 a.m.