Description Usage Arguments Value Note Author(s) References See Also Examples
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.
1 |
data |
Data set |
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 |
pos |
A numeric vector that indicates the position of the independent variables to disturb once you eliminate in |
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. |
tols
must be a constant vector equal to tol
. It is obtained to check if data have been correctly perturbed.
R. Salmer<f3>n (romansg@ugr.es) and C. Garc<ed>a (cbgarcia@ugr.es).
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 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]))
|
obs consume income relprice twentys
[1,] 1923 99.2 96.7 101.0 1
[2,] 1924 99.0 98.1 100.1 1
[3,] 1925 100.0 100.0 100.0 1
[4,] 1926 111.6 104.9 90.6 1
[5,] 1927 122.2 104.9 86.5 1
[6,] 1928 117.6 109.5 89.7 1
cte income relprice twentys
[1,] 99.2 1 96.7 101.0 1
[2,] 99.0 1 98.1 100.1 1
[3,] 100.0 1 100.0 100.0 1
[4,] 111.6 1 104.9 90.6 1
[5,] 122.2 1 104.9 86.5 1
[6,] 117.6 1 109.5 89.7 1
tols normas
[1,] 1 4.214807
[2,] 1 3.430323
[3,] 1 2.777928
[4,] 1 3.965039
[5,] 1 2.300320
[1] 1
[1] 3.337683
[1] 2.300320 4.214807
consumption wage.income non.farm.income farm.income
1 62.8 43.41 17.10 3.96
2 65.0 46.44 18.65 5.48
3 63.9 44.35 17.09 4.37
4 67.5 47.82 19.28 4.51
5 71.3 51.02 23.24 4.88
6 76.6 58.71 28.11 6.37
KG[, 1] cte wage.income non.farm.income farm.income
1 62.8 1 43.41 17.10 3.96
2 65.0 1 46.44 18.65 5.48
3 63.9 1 44.35 17.09 4.37
4 67.5 1 47.82 19.28 4.51
5 71.3 1 51.02 23.24 4.88
6 76.6 1 58.71 28.11 6.37
[1] 1
[1] 3.128441
[1] 0.2094383 9.3379935
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.