Dear all,
I would like to conduct the following regression:
y = a + x1*(1-D) + x2*D + x3*(1-D) + x4*D
or see the pictuure below:
Array
where D is a dummy variable that takes on the value of 1 if the market return is positive and 0 otherwise
x1 and x2 are the same independent variable, while x3 and x4 are also the same independent variable.
Depending on whether the Dummy Variables takes on the value of 0 or 1, one x of each pair is cancelled out.
I have the dependent, independent variables and dummy variable calculated, I am just stuck on how code the regression command, as I do not want the Dummy variable to have its own coefficient in the output table.
How do I go about doing this?
Related Posts with Regression with Categorical Dummy Variable
Numlist in foreach loop, when number is within variable nameI have been trying to use ‘numlist’ in a foreach loop as I have a list of about 100 variables, all r…
how to assure that 2 variables are the same?how to assure that 2 variables are the same? …
Repeated Measures Correlation QuestionHello all! Beginner stats student here. I was hoping to gain some insight from the board in how to …
Line break in a string variable, its posible?Hi all, I wonder if its posible a line break in a string variable, my idea is use this variable in …
Generating a numeric variable from string variableI currently have a variable called "Residence" which takes on two values: Urban and Rural I'm gener…
Subscribe to:
Post Comments (Atom)
0 Response to Regression with Categorical Dummy Variable
Post a Comment