options pageno=1 linesize=80;
goptions reset=all;
title "Multiple regression for shelf_life";
data  shelf_life;
input  Temp   RH    Days;
	datalines;
10	94	65
10	93	51
10	94	70
9	93	78
	;
	run;
* Print data set;
proc print data= shelf_life;
run;
* Plot y vs. x variables;
proc gplot data=shelf_life;
	plot Days*(Temp   RH  );
	symbol1 i=rl v=star c=black;
	run;
* Multiple regression analysis;
ods html;
ods graphics on;
proc reg data=shelf_life;
	* Specify regression model and request residual-residual plots;
	model Days = Temp RH  / clb stb partial tol selaction=RSquare;
	run;
	Plot r.*pred. r.*nqq.;
run;
quit;
proc reg data=shelf_life;
	* Specify regression model and request residual-residual plots;
	model Days = Temp / clb stb partial tol selaction=RSquare;
	run;
ods graphics off;
ods html close;
quit;Greeting All
I used multiple regression and I got high R Square with non-significant. How I can write the equation
The code was attached under the name Shelf-life1.
Best Regards
Samir
Attachments aren't supported at this time, you can paste your code into the editor box directly or embed pictures using photos. Do not attach your code as a picture though. 
You can write the equation from the parameter estimates table. You can also use a SCORE statement or PROC SCORE or PROC PLM to score new data with a developed model.
@samer_badri75 wrote:
options pageno=1 linesize=80; goptions reset=all; title "Multiple regression for shelf_life"; data shelf_life; input Temp RH Days; datalines; 10 94 65 10 93 51 10 94 70 9 93 78 ; run; * Print data set; proc print data= shelf_life; run; * Plot y vs. x variables; proc gplot data=shelf_life; plot Days*(Temp RH ); symbol1 i=rl v=star c=black; run; * Multiple regression analysis; ods html; ods graphics on; proc reg data=shelf_life; * Specify regression model and request residual-residual plots; model Days = Temp RH / clb stb partial tol selaction=RSquare; run; Plot r.*pred. r.*nqq.; run; quit; proc reg data=shelf_life; * Specify regression model and request residual-residual plots; model Days = Temp / clb stb partial tol selaction=RSquare; run; ods graphics off; ods html close; quit;Greeting All
I used multiple regression and I got high R Square with non-significant. How I can write the equation
The code was attached under the name Shelf-life1.
Best Regards
Samir
Hi Sir
Many thanks for your quick response. I add the code.
Thanks
I would suggest you don't refer to people as 'Sir' unless you know their gender.
Your code has warnings, you should fix those - check your log.
Your formula is:
Y = 222 - 16 * temp
@samer_badri75 wrote:
Hi Sir
Many thanks for your quick response. I add the code.
Thanks
Sorry for that
Thanks for your help
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.