BookmarkSubscribeRSS Feed
joe66
Calcite | Level 5

Hi, may I know how to get the housing data in the link below, which contains the variables such as 

 stable_housing treatment hous_conts

I would like using the same data to test my code.

 

http://support.sas.com/kb/59/081.html

1 REPLY 1
Reeza
Super User

Here you go. Note that the documentation states the example is from Kenny and that if you follow that page you can find the source data. You will need to code treatment to a numeric variable to be able to use it though, I've left that as a step for you. If you code it differently than SAS did, your estimates will be the 'opposite sign' than what you expect, for example, -0.2483 will be 0.2483.

 

Once that's corrected it gives the exact same values in the note. More fully coded examples with data are available in the Example section of PROC CASUALMED.

 

data Housing;
input person  treatment $ stable_housing  hous_conts  entit_conts sr_hc ;
label person="person" treatment="treatment" stable_housing="stable_housing" hous_conts="hous_conts" entit_conts="entit_conts" sr_hc="sr_hc";
datalines;
1.00 Treated 30.00 8.00 0.00 2.83
3.00 Control 0.00 0.00 0.00 0.00
5.00 Treated 28.57 5.32 6.68 2.31
9.00 Treated 27.71 8.68 5.32 2.95
10.00 Treated 25.00 0.00 0.00 0.00
12.00 Control 0.00 0.00 0.00 0.00
13.00 Treated 30.00 9.32 1.32 3.05
17.00 Treated 19.83 2.68 2.68 1.64
18.00 Control 30.00 0.00 0.00 0.00
20.00 Control 0.00 4.00 0.00 2.00
21.00 Treated 0.00 0.00 0.00 0.00
26.00 Treated 30.00 2.68 0.00 1.64
27.00 Control 25.71 2.68 0.00 1.64
28.00 Treated 30.00 2.68 0.00 1.64
30.00 Treated 0.00 2.68 1.32 1.64
36.00 Control 0.00 2.68 0.00 1.64
37.00 Treated 17.14 14.68 0.00 3.83
38.00 Control 11.33 1.32 0.00 1.15
39.00 Control 10.00 1.32 0.00 1.15
40.00 Control 0.00 0.00 2.68 0.00
41.00 Control 30.00 2.68 0.00 1.64
42.00 Treated 0.00 0.00 0.00 0.00
43.00 Control 21.43 8.00 4.00 2.83
44.00 Treated 8.29 1.32 9.32 1.15
46.00 Control 0.00 0.00 1.32 0.00
49.00 Control 0.00 0.00 0.00 0.00
52.00 Control 0.00 6.68 1.32 2.58
54.00 Control 0.00 6.68 5.32 2.58
56.00 Treated 30.00 1.32 0.00 1.15
57.00 Treated 30.00 5.32 8.00 2.31
61.00 Control 25.71 20.00 0.00 4.47
62.00 Control 4.29 2.68 0.00 1.64
64.00 Treated 30.00 2.68 0.00 1.64
65.00 Treated 28.43 5.32 5.32 2.31
67.00 Control 0.29 0.00 0.00 0.00
68.00 Control 0.00 4.00 1.32 2.00
69.00 Treated 17.14 0.00 4.00 0.00
70.00 Control 0.00 0.00 0.00 0.00
72.00 Treated 9.67 0.00 6.68 0.00
76.00 Control 24.50 4.00 0.00 2.00
79.00 Treated 30.00 8.00 1.32 2.83
80.00 Treated 0.00 0.00 0.00 0.00
82.00 Treated 24.33 2.68 6.68 1.64
85.00 Treated 0.00 4.00 0.00 2.00
86.00 Control 27.86 1.32 0.00 1.15
87.00 Control 0.00 0.00 0.00 0.00
88.00 Treated 0.00 0.00 1.32 0.00
90.00 Control 4.29 1.32 0.00 1.15
91.00 Treated 29.86 10.68 6.68 3.27
92.00 Treated 29.67 5.32 4.00 2.31
94.00 Treated 30.00 14.68 5.32 3.83
96.00 Treated 22.14 9.32 8.00 3.05
97.00 Control 25.43 2.00 0.00 1.41
98.00 Control 30.00 2.68 8.00 1.64
99.00 Control 30.00 1.32 4.00 1.15
100.00 Control 30.00 1.32 4.00 1.15
101.00 Control 30.00 2.68 8.00 1.64
102.00 Control 30.00 10.68 2.68 3.27
104.00 Treated 13.43 7.32 2.68 2.71
105.00 Treated 17.14 0.00 8.00 0.00
107.00 Control 14.14 2.68 0.00 1.64
108.00 Control 30.00 2.68 6.68 1.64
109.00 Treated 14.14 6.00 3.32 2.45
110.00 Control 18.71 0.00 0.00 0.00
111.00 Treated 5.00 1.32 5.32 1.15
112.00 Treated 30.00 4.00 4.00 2.00
114.00 Treated 0.00 0.00 0.00 0.00
115.00 Control 0.00 0.00 1.32 0.00
116.00 Treated 30.00 5.32 0.00 2.31
117.00 Control 8.57 6.68 1.32 2.58
119.00 Control 30.00 2.68 0.00 1.64
120.00 Treated 30.00 5.32 5.32 2.31
121.00 Control 20.00 0.00 0.00 0.00
122.00 Control 11.67 1.32 4.00 1.15
123.00 Control 29.50 1.32 0.00 1.15
124.00 Control 0.00 4.00 0.00 2.00
125.00 Treated 30.00 5.32 1.32 2.31
127.00 Control 0.00 0.00 0.00 0.00
128.00 Control 0.00 0.00 2.68 0.00
130.00 Control 0.00 0.00 0.00 0.00
131.00 Control 0.00 0.00 0.00 0.00
135.00 Control 0.00 0.00 1.32 0.00
136.00 Control 30.00 1.32 0.00 1.15
138.00 Control 0.00 1.32 1.32 1.15
139.00 Treated 0.00 1.32 0.00 1.15
140.00 Control 0.00 4.00 0.00 2.00
141.00 Control 24.00 6.68 0.00 2.58
143.00 Treated 30.00 4.00 6.68 2.00
144.00 Control 0.00 0.00 0.00 0.00
145.00 Treated 30.00 10.68 4.00 3.27
147.00 Control 21.20 0.00 0.00 0.00
148.00 Control 15.00 0.00 1.32 0.00
150.00 Control 30.00 4.00 4.00 2.00
155.00 Control 30.00 0.00 1.32 0.00
156.00 Treated 30.00 13.32 8.00 3.65
159.00 Treated 0.00 1.32 0.00 1.15
162.00 Control 0.00 0.00 0.00 0.00
164.00 Control 29.50 9.32 5.32 3.05
166.00 Control 0.00 2.68 2.68 1.64
168.00 Treated 1.75 3.32 6.00 1.82
169.00 Treated 30.00 4.00 10.68 2.00
170.00 Control 0.00 2.68 9.32 1.64
171.00 Control 15.00 2.68 6.68 1.64
172.00 Control 0.00 3.32 1.32 1.82
173.00 Treated 10.50 2.68 4.00 1.64
174.00 Control 0.00 1.32 1.32 1.15
175.00 Control 27.27 10.68 2.68 3.27
178.00 Treated 30.00 5.32 0.00 2.31
179.00 Control 30.00 8.00 2.68 2.83
;;;;

@joe66 wrote:

Hi, may I know how to get the housing data in the link below, which contains the variables such as 

 stable_housing treatment hous_conts

I would like using the same data to test my code.

 

http://support.sas.com/kb/59/081.html


 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 938 views
  • 1 like
  • 2 in conversation