Hello,
I hope all of you are staying safe and healthy.
I am trying to figure out two things:
1. How do I create a text file of coefficients from a regression without variable names and column headings
2. How do I create a text file of a covariance matrix without the `omitted' dummy variable when we use -i.var-
To illustrate my situation, I ran the following:
eststo regression1: reg yvar v1 v2 v3 i.E
estout regression1using "$output/regressionBeta.txt", c(b) keep(v1 v2 v3 2.E 3.E) replace
The second line gives me a text file with the following result:
regression1
b
_cons 13.69642
v1 .3184874
v2 .12065
v3 -0.03345
2.E .3685693
3.E .7410206
To make the file more readable for another programming language, I want to get rid of both the variable names and the headings ("regression1" and "b" ) so that the result would only contain the numbers.
Also, in order to store the covariance matrix, I ran the following:
matrix V1=e(V)
mat2txt, matrix(V1) saving("$output/regressionVCov.txt") replace
The second line produces a text file with unnecessary row and column for '1.v3':
v1 v2 v3 1b.E 2.E 3.E _cons
v1 .00008257 -4.338e-06 5.486e-08 0 -4.418e-06 -7.580e-06 .00001818
v2 -4.338e-06 .00003073 -4.590e-07 0 -6.885e-06 -9.601e-06 -.00048082
v3 5.486e-08 -4.590e-07 6.920e-09 0 1.266e-07 1.836e-07 7.085e-06
1b.E 0 0 0 0 0 0 0
2.E -4.418e-06 -6.885e-06 1.266e-07 0 .00022758 .00019557 -.00010479
3.E -7.580e-06 -9.601e-06 1.836e-07 0 .00019557 .00022442 -.00008609
_cons .00001818 -.00048082 7.085e-06 0 -.00010479 -.00008609 .00789561
What command should I use instead to get rid of the column and row for 1b.E and the headings here?
Thank you very much for your help.
I hope all of you are staying safe and healthy.
I am trying to figure out two things:
1. How do I create a text file of coefficients from a regression without variable names and column headings
2. How do I create a text file of a covariance matrix without the `omitted' dummy variable when we use -i.var-
To illustrate my situation, I ran the following:
eststo regression1: reg yvar v1 v2 v3 i.E
estout regression1using "$output/regressionBeta.txt", c(b) keep(v1 v2 v3 2.E 3.E) replace
The second line gives me a text file with the following result:
regression1
b
_cons 13.69642
v1 .3184874
v2 .12065
v3 -0.03345
2.E .3685693
3.E .7410206
To make the file more readable for another programming language, I want to get rid of both the variable names and the headings ("regression1" and "b" ) so that the result would only contain the numbers.
Also, in order to store the covariance matrix, I ran the following:
matrix V1=e(V)
mat2txt, matrix(V1) saving("$output/regressionVCov.txt") replace
The second line produces a text file with unnecessary row and column for '1.v3':
v1 v2 v3 1b.E 2.E 3.E _cons
v1 .00008257 -4.338e-06 5.486e-08 0 -4.418e-06 -7.580e-06 .00001818
v2 -4.338e-06 .00003073 -4.590e-07 0 -6.885e-06 -9.601e-06 -.00048082
v3 5.486e-08 -4.590e-07 6.920e-09 0 1.266e-07 1.836e-07 7.085e-06
1b.E 0 0 0 0 0 0 0
2.E -4.418e-06 -6.885e-06 1.266e-07 0 .00022758 .00019557 -.00010479
3.E -7.580e-06 -9.601e-06 1.836e-07 0 .00019557 .00022442 -.00008609
_cons .00001818 -.00048082 7.085e-06 0 -.00010479 -.00008609 .00789561
What command should I use instead to get rid of the column and row for 1b.E and the headings here?
Thank you very much for your help.
Comment