Hello,
I have data which resembles the following:
clear
input double(y x1 x2)
12 3 5
3 2 4
1 3 3
2 1 1
3 3 2
3 2 3
1 4 2
end
[/CODE]
Here, I have a dependent variable (y), and two independent variables, x1 and x2. Essentially, I wish to run two separate regressions, one of y on x1 and the other of y on x2. The first regression:
results in coefficient estimates of the intercept and the slope coefficient x1, which is stored as a scalar, retrievable in _b[x1]. The same idea holds for x2, where the coefficient is in _b[x2].
I wish to store these coefficients after the regressions, and produce a table, which as two rows, and two columns column. The first corresponds to the proportion of _b[x1] in the sum of _b[x1] and _b[x2].. The second row corresponds to the proportion of _b[x2] in the sum of _b[x1] and _b[x2]. The second row, should contain the standard errors of these proportionate quantities. The table, ideally, should look like this:
I am certain the -est sto- command is applicable here, but I could definitely benefit from some guidance at this point.
Kind regards,
CS.
I have data which resembles the following:
clear
input double(y x1 x2)
12 3 5
3 2 4
1 3 3
2 1 1
3 3 2
3 2 3
1 4 2
end
[/CODE]
Here, I have a dependent variable (y), and two independent variables, x1 and x2. Essentially, I wish to run two separate regressions, one of y on x1 and the other of y on x2. The first regression:
Code:
regress y x1
I wish to store these coefficients after the regressions, and produce a table, which as two rows, and two columns column. The first corresponds to the proportion of _b[x1] in the sum of _b[x1] and _b[x2].. The second row corresponds to the proportion of _b[x2] in the sum of _b[x1] and _b[x2]. The second row, should contain the standard errors of these proportionate quantities. The table, ideally, should look like this:
Code:
Proportion Standard error _b[x1]/(_b[x1] +_b[x2]) SE(_b[x1]/(_b[x1] +_b[x2]) _b[x2]/(_b[x1] +_b[x2]) SE(_b[x2]/(_b[x1] +_b[x2])
I am certain the -est sto- command is applicable here, but I could definitely benefit from some guidance at this point.
Kind regards,
CS.
Comment