Partial F test and dummy variables

Reply
New Contributor
Posts: 2

Partial F test and dummy variables

[ Edited ]

data one;
input healthpoints age housetype;
datalines;
114 66 3
242 38 1
232 31 2
90 57 2
282 24 1
122 68 1
207 60 1
222 23 2
238 49 1
262 31 1
262 26 2
47 70 2
178 40 3
212 31 3
247 20 1
125 40 1
128 66 1
178 45 2
202 40 2
;

 

a)what is the point estimate of the age effect for each housing types .(am not sure what point estimate means in this scenario..do they mean parameter estimate? ....maybe it's like one dummy varaible per house type)

b)Is the point estimate sig. different between housing=1 and housing=2. ( use either partial f test or t test maybe)

c) propose a model to test all three housing to see if they are sig different from each other (yes again...similiear to b but testing all at same time, this is related to interaction modelling)

----------Below are codes that may be helpful in solving the problems

 

subsetting for categorical that has 3 categories

data a;

set one;

if x=1 or x=2;

run;

 

subsetting for categorical that has 2 categories

data b;

set a;;

if x=1 then dum=1;

else dum=0;

run;

 

intereaction term for one continous variable and one dummy variable

data c;

set b;

zdum=z*dum;

run;

 

two dummy variable for a cat. variable with 3 categories

 

data aa;

set one;;

if x=1 then dum1=1;

else xdum1=0;

if x=2 then dum2=1;

else dum2=0;

run;

 

intereaction for continues with two dummy variables

 

data bb;

set aa;

zdum1=z*dum1;

zdum2=z*dum2;

run;

 

sample of partial f test

proc reg data=d;

model y=x1 x2 x3;

test x2=x3=0;

run;

Super User
Posts: 10,466

Re: Partial F test and dummy variables

Please provide example in the form of a data step if you want someone to test with your data. Since Excel has no actual data types then the choices others make to import your data into SAS may result in differing data types. Which means that their code may not run with your SAS dataset. Also some of our users are blocked from downloading Excel files by their security policies.

New Contributor
Posts: 2

Re: Partial F test and dummy variables

Thanks for letting me know. I have edited my post.
Ask a Question
Discussion stats
  • 2 replies
  • 389 views
  • 0 likes
  • 2 in conversation