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
Moving 12 - 1 cumulative returnHey all, I am trying to replica a momentum trading strategy for which I'm building portfolios based…
Merging two rowsHi, I've dataset like this: Code: * Example generated by -dataex-. To install: ssc install dataex …
Bivariat probit model using panel dataDear, I hope you are fine, maybe somebody know the command of a Bivariate using panel data structur…
Comparing means from 6 different samples.Dear All, I have 6 different data sets. Say, my variable of interest is y and I want to test if the…
Transform data or use a non-parametric analysisI have data from an experiment in which five different methods were used to abrade a ceramic and the…
Subscribe to:
Post Comments (Atom)
0 Response to Categorical Variables Treatment at Regression Analysis
Post a Comment