Andreas Jensen
Andreas Jensen

Reputation: 21

How can I force intercept to be 1 within PROC SGPANEL?

In a linear regression I would like the line to go through (0,1) i.e. I want to force/restrict the intercept parameter to be 1. This is preferably done using a REG statement within a PROC SGPANEL (since I want to display multiple regression lines in the same plot, alternatives are, however, very much appreciated)

The syntax is:

PROC SGPANEL DATA=...;
 PANELBY ...;
 REG Y=... X=... / ...;
RUN;

I don't think that the RESTRICT statement works here. So what can I do in this situation?

Upvotes: 0

Views: 85

Answers (1)

Peter Flom
Peter Flom

Reputation: 2388

I think this is almost certainly a bad idea. However, if you insist on it, then I think the only way is to do the regressions for each panel with the restrictions, make new variables that consist of X and Y variables for each strata, then use those values in PROC SGPANEL with the LINEPARM statement.

Upvotes: 0

Related Questions