- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have a data of this form:
data brand;
input preference moisturecontent sweetness @@;
datalines;
64 4 2 73 4 4 61 4 2 76 4 4 72 6 2 80 6 4
71 6 2 83 6 4 83 8 2 89 8 4 86 8 2 93 8 4
88 10 2 95 10 4 94 10 2 100 10 4
;
run;
proc print;
run;proc reg data=brand;model preference=moisturecontent sweetness;run;
So I used PROC REG to write out the prediction equation. How to I write a separate prediction equation between brand liking and sweetness when moisture content equals to 4 and when moisture content equals to 10?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It's not quite clear what you question is, can you please clarify in detail?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Reeza, I apologize for the mistake. I have corrected it. PROC REG gives the multiple regression line for the data. But I want to come up with two different equations for preference and sweetness when moisture content equals to 4 and when moisture content equals to 10.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@JUMMY wrote:
@Reeza, I apologize for the mistake. I have corrected it. PROC REG gives the multiple regression line for the data. But I want to come up with two different equations for preference and sweetness when moisture content equals to 4 and when moisture content equals to 10.
Put that variable in the BY statement too. The BY statement can take multiple variables and will do it by nested groups.
By make sweetness;