Article View: comp.soft-sys.sas
Article #39Re: Testing for regression slopes,again
From: shiling
Date: Thu, 12 Nov 1998 00:00
Date: Thu, 12 Nov 1998 00:00
77 lines
2555 bytes
2555 bytes
I think you may pool the samples togather because you assume the contant terms
are the same for men as for women.
So the model looks like,
y=a + b*x + b'*z
where [y] =yx if from men
yz if from women
Where [x] =x if from men
0 if from women
Where [z] =z if from women
0 if from men
Here is the simulation of your problem
data t1;
do x = 1 to 30;
y=10 + 3*x + rannor(0);
z=0;
output;
end;
do z = 1 to 40;
y=10 +4*z + rannor(0);
x=0;
output;
end;
run;
/* the data is generated by diff. model, */
/*so you may expect to reject you H0 */
proc reg data=t1;
model y= x z;
xz: test x=z;
quit;
run;
Hope this helps.
In article <3649a3cc.23439818@news.ucm.es>,
jportela@eucmax.sim.ucm.es (Javier) wrote:
>
> Hi,
>
> I want to know how to perform a test for the hypotheses:
>
> H0: The slope b in the regression curve Y=a+bX (for population A=men) is equal
> to the slope b' in the regression curve Y=a+b' X (for population B=women)
>
> versus H1: they are different
>
> That is, I have two independent samples (men and women)
> and realise two independent least squares regression models.
>
> For men, it estimates b by the OLS estimator
> For women, it estimates b' by the OLS estimator
>
> I want to test H0:b=b'
>
> Is there a simple way to do it in SAS/STAT? (I mean using REG, GLM or other
> procedures)
>
> (Suppose I have data with variables height, weight, and sex and want to
compare
> the slopes of regression lines between height and weight for men and women)
>
> Thanks in advance,
>
> Javier
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<72fbif$can$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3649a3cc.23439818@news.ucm.es>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 112edf,87103062a9021125 X-Google-Attributes: gid112edf,public X-Google-Thread: 121044,194a1016b0930a5f,start X-Google-Attributes: gid121044,public From: shiling@math.wayne.edu Subject: Re: Testing for regression slopes,again Date: 1998/11/12 Message-ID: <72fbif$can$1@nnrp1.dejanews.com> X-Deja-AN: 411149765 References: <3649a3cc.23439818@news.ucm.es> To: jportela@eucmax.sim.ucm.es X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 136.1.1.19 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Nov 12 19:05:52 1998 GMT Newsgroups: comp.soft-sys.sas,bit.listserv.sas-l X-Http-User-Agent: Mozilla/4.05 [en] (Win95; I)