Hello everyone, Hope you all feeling well. I need help in the following specific case in STATA:
First I wanna give you background about my question, which is mentioned below:
Dependent Variable = Y
Independent Variables = X1, X2, X3, X4
X1 = contain categorical values (0, 1)
X2 = contain categorical values (1, 2, 3, 4, 5)
X3 = contain categorical values (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
X4 = contain categorical values from 30 to 80
I Labelled all my categorical variables like below:
X1:
0 = F
1 = M
X2:
1 = SS
2 = JC
3 = UG
4 = PG
5 = PD
X3:
Below 1 values: = B1
between 1 and 5 = U15
between 5 and 10 = U510
Above 10 = A10
X4:
Below 30 = B30
Between 30 and 40 = B3040
Between 40 and 50 = B4050
Between 50 and 60 = B5060
Above 60 = A60
By regressing, I find the below results:
Y Coef. Std. Err. z
X1:
0: 0.3534 0.332 0.234
1: 0.4543 0.245 0.132
X2:
1 0.4534 0.245 0.543
2 0.6457 0.652 0.767
3 0.2465 0.124 0.232
4 0.6634 0.543 0.657
5 0.7532 0.123 0.232
X3:
Under 1: 0.9506 0.545 0.564
between 1 and 5 0.8474 0.231 0.234
between 5 and 10 0.6767 0.235 0.576
Above 10 0.4575 0.232 0.898
X4:
Below 30: 0.8678 0.646 0.876
Between 30 and 40 0.2346 0.576 0.657
Between 40 and 50 0.6544 0.786 0.567
Between 50 and 60 0.4322 0.574 0.256
60 Plus 0.3235 0.345 0.245
Label command replace original values by below: (suppose in case of X2)
label define X1o 1 SS 2 JC 3 UG 4 PG 5 PD
MY PROBLEM:
by label command, each variable replace it's original value with 1, 2, 3, 4 or 5. Mean to say by labeling the independent variables, the dependent variable (Y) then regress not by original values of X1, X2, X3 and X4 but replace value, which shows against theory results.
"NOW MY QUESTION IS"
Is it possible that Y regress on the categories of X1, X2, X3 and X4 original values ??
Thanks for stopping by.
Related Posts with Categorical Variables Treatment at Regression Analysis
OLS or ProbitDear community, I conduct a research of how individual level and collective level economic indicator…
nbreg with fixed effects and clustered se? (no panel data)Hi I have a question regarding to use of fe and clustered se. The majority of the threads on statal…
Interaction of time-invariant variable in fixed effects modelHello everyone, I am currently running fixed effects model to see the relationship between program …
multilevel logistic regression: question about cross-level interactionHello, I have a multilevel logistic regression model, and I'm trying to do cross-level interaction w…
Use stored correlation matrix from PWCORR in CORR2DATAHey Stata-listers, I will preface this by saying that I am not super familiar with matrices in Stat…
Subscribe to:
Post Comments (Atom)
0 Response to Categorical Variables Treatment at Regression Analysis
Post a Comment