LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 19 Oct 2005 06:30:27 -0700
Reply-To:   Anonymous user <Number_42@CARAMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Anonymous user <Number_42@CARAMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: Number of points used in a linerar regression
Comments:   To: sas-l@uga.edu
In-Reply-To:   <1129727768.671613.97790@g14g2000cwa.googlegroups.com>
Content-Type:   text/plain; charset="iso-8859-1"

Found out alone:

data t; input id $ week y x; datalines; id1 1 165 80 id1 5 168 82 id1 8 169 83 id2 2 155 60 id2 3 155 60.5 id2 7 156 61 ;

/* linear regression: y = a * x + b */ proc reg data = t outest = params outsscp = sscp noprint; model y = x / selection=rsquare; by id; *plot y * x / name='linReg'; Title "Linear regression"; output out = linReg predicted = yhat; run; quit;

proc sql; create table final as select p.id, p.x as a, p.Intercept as b, p._RSQ_ as r2 from params p; quit;

proc sql; create table final2 as select f.*, s.Intercept as N from final f, sscp s where f.id = s.id and s._TYPE_ = 'N'; quit;


Back to: Top of message | Previous page | Main SAS-L page