Multiple regression with dummy variables
How can I select intercept in multiple regression?
I want two lines to cross the Y axis in the (0,100) point.
Thanks
Tohar
Basic Data Analysis and ModelingRe: Multiple regression with dummy variablesI assume that you selected Analyze > Fit Model to start the multiple regression. A check box is at the center of the bottom of the launch dialog. Select it to remove the intercept from the model
Re: Multiple regression with dummy variablesThis post describes how to use the Bivariate platform with by() .... to collect the slopes and intercepts:
Creating-columns-from-Linear-Fit-Constants-slope-intercept
Re: Multiple regression with dummy variablesPerhaps more details are needed as I am the third to respond and I have a different take on your question. You said you wanted the lines to go through (0, 100). That is not the same as having the y-intercept of zero. You could use the nonlinear platform to build a model with a fixed y-intercept of 100 and the rest of the linear model to estimate the parameters with that restriction.
Provide a bit more clarity of your situation so that we can better assist you.
Re: Multiple regression with dummy variablesOh, thanks, I miss-read this sentence.
In the Fit Y - by - X / Bivariate Platform there is also an option to set the intercept to a fixed value:
Constrain intercept to


Re: Multiple regression with dummy variablesI'm trying to do a multivariable linear regression. A continuous variable explains -X and a continuous variable is explained -Y and another dummy factor is categorical 0 or 1. I know that the lines should cut the Y-axis at 100 and I want to define this in the model.
Similar to the solution in the Fit Y by X platform that "hogi" suggested but I have two lines- two groups.
Thank you very much
Re: Multiple regression with dummy variables@Tohar , so it sounds like you have an ANCOVA model (one categorical factor C, and one continuous X) and you want to regress Y on these. Define Y100 = Y-100. then use Y100 as your response. then the only effect in your model will be C*X, with no intercept. See pic below. Also, in the red triangle pull down menu deselect "Center Polynomials".

Run this and get the following: And remember Y100 is Y-100. So, when Y100=0, Y=100. You can then get creative with Save Prediction Formula/Graph Builder/etc to get the Y axis back to the raw scale (shift it back up by 100).

Re: Multiple regression with dummy variablesThank you very much
I am not about the result I got; the lines cross the Y axis in (0,0) - see attached.
My goal is to check if there is a difference in rate (ie slope) between the two treatment groups. It is not necessary to check whether there is a difference in the intercept, I want to set it both in the model and in the presentation graph at (0,100).
Many thanks!!!!!
Tohar
Re: Multiple regression with dummy variables@Tohar Assuming your model is correct (I have my doubts from looking at your residual plots etc), the p-value for the parameter estimate and/or in the ANOVA table tells the story (they are equivalent) If less than 0.05 (that is the "usual" threshold /Type 1 error rate) then you could claim that there is a difference in slope. Strictly speaking, you are testing whether or not there is any difference from the reduced model Y100=0 (i.e, just noise). The p-value says reject the Y100= 0 model in favor of the two slope model (where slope1 = - slope2).
Re: Multiple regression with dummy variablesDid you try the Group By command in the platform menu (red triangle) before using Fit Special and specifying a Y-intercept = 100?
Re: Multiple regression with dummy variables@Tohar . On second thought, use the same model with the interaction (as I said) and Days From Start.(see below). Then assess the equivalence of slopes via the p-value for the interaction parameter estimate. Adding the extra term will give more flexibility wrt the slope estimates (doesn't force slope1 = -slope2).

Re: Multiple regression with dummy variables@Tohar For some more detail re my previous post. Notice that I regressed Y-100 on T and T*ARM with no intercept.
So, the final equation is Y-100 = B0*T + B1*T*I(ARM=C) + B2*T*I(ARM=S), where I(ARM=C) = 1 if ARM=C, 0 otherwise. I(ARM=S) is defined similarly. So, B1 and B2 are deviations from the overall mean slope (B0). Defined this way, the slope for ARM C = B0+B1, and the slope for ARM S = B0+B2. And, to see the common intercept is 100, add 100 to both sides of the equation to get.
Y = 100 + B0*T + B1*T*I(ARM=C) + B2*T*I(ARM=S).