perturb.n: Perturbation and estimation in a multiple linear model

View source: R/perturb.n.R

perturb.nR Documentation

Perturbation and estimation in a multiple linear model

Description

The function quantifies the variations in the estimations of the coefficients of a multiple linear regression when a perturbation is introduced in the quantitative data set.

Usage

perturb.n(data, n, mu, dv, tol = 0.01, pos = NULL)

Arguments

data

Data set (y, X) where y and X contain, respectively, the observations of the dependent variable and independients variables (intercept included) of the multiple linear regression.

n

Number of times that perturbation is performed.

mu

Any real number.

dv

Any real positive number.

tol

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

pos

A numeric vector that indicates the position of the independent variables to disturb once you eliminate in data the dependent variable and the intercept. By default pos=NULL.

Value

tols

A vector presenting the percentage of disturbance induced in the variables indicated in each iteration.

norms

A vector presenting the percentage of variation in the estimations of the coefficients in each iteration.

Note

tols must be a constant vector equal to tol. It is obtained to check if data have been correctly perturbed.

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.

Examples

tol = 0.01
mu = 10
dv = 10

# Henri Theil's textile consumption data modified
data(theil)
head(theil)
cte = array(1,length(theil[,2]))
theil.y.X = cbind(theil[,2], cte, theil[,-(1:2)])
head(theil.y.X)

iterations = 5

perturb.n.T = perturb.n(theil.y.X, iterations, mu, dv, tol, pos = c(1,2))
perturb.n.T
mean(perturb.n.T[,1])
mean(perturb.n.T[,2])
c(min(perturb.n.T[,2]), max(perturb.n.T[,2]))

# Klein and Goldberger data on consumption and wage income
data(KG)
head(KG)
cte = array(1,length(KG[,1]))
KG.y.X = cbind(KG[,1], cte, KG[,-1])
head(KG.y.X)

iterations = 1000

perturb.n.KG = perturb.n(KG.y.X, iterations, mu, dv, tol, pos = c(1,2,3))
mean(perturb.n.KG[,1])
mean(perturb.n.KG[,2])
c(min(perturb.n.KG[,2]), max(perturb.n.KG[,2]))

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