I am trying to figure out how to divide the values of the variable when my X=1 versus when my X=0 rather than subtracting, as a linear regression does.
For example, I have a Y variable that takes on values between -30 and +30. I have a dummy X variable taking on values of 0 and 1. When I run a simple linear regression, I get the following:
reg Y X
where the coefficient on X is equal to the value of Y when X=1 MINUS the value of Y when X=0.
What I need instead is for the coefficient on X to isolate the value of Y when X=1 DIVIDED BY the value of Y when X=0, and for the standard error to be calculated properly. Unfortunately I cannot simply transform the Y variable to be equal to a ratio because this is a between-subjects design (some subjects have X=0, some have X=1).
My first thought was to transform the Y variable via logs or something else, but the negative values of the variable make logs a suboptimal choice.
I'm looking for other transformations or alternative regressions that can accomplish this! Thanks in advance for any thoughts. It seems like there should be an obvious solution but it's not coming to me.
For example, I have a Y variable that takes on values between -30 and +30. I have a dummy X variable taking on values of 0 and 1. When I run a simple linear regression, I get the following:
reg Y X
where the coefficient on X is equal to the value of Y when X=1 MINUS the value of Y when X=0.
What I need instead is for the coefficient on X to isolate the value of Y when X=1 DIVIDED BY the value of Y when X=0, and for the standard error to be calculated properly. Unfortunately I cannot simply transform the Y variable to be equal to a ratio because this is a between-subjects design (some subjects have X=0, some have X=1).
My first thought was to transform the Y variable via logs or something else, but the negative values of the variable make logs a suboptimal choice.
I'm looking for other transformations or alternative regressions that can accomplish this! Thanks in advance for any thoughts. It seems like there should be an obvious solution but it's not coming to me.
Comment