y***q 发帖数: 99 | 1 SAS BASE 123的第13道
A raw data file is listed below:
ranch,1250,2,1,sheppard avenue,"$64,000"
split,1190,1,1,rand street,"$65,850"
condo,1400,2,1.5,market street,"80,050"
twostory,1810,4,3,garris street,"$107,250"
ranch,1500,3,3,kemble avenue,"$86,650"
split,1615,4,3,west drive,"94,450"
split,1305,3,1.5,graham avenue,"$73,650"
data work.condo_ranch;
infile 'e:\SASdata\base13.xls' dsd;
input style $ @;
if style = 'condo' or style = 'ranch' then
input sqfeet bedrooms baths street $ price : dollar10. | c******s 发帖数: 85 | 2 I run a similar program and the answer is indeed 7.
The if statement only determines whether "sqfeet bedrooms baths street $
price" will be in the output, but it does not affect the No of observations. | Y**********8 发帖数: 67 | 3 同意
执行第一个input语句,input style就已经把所有obs读入了
假如在if..then..之后加个:else delete 估计会筛选出特定style的obs
observations.
【在 c******s 的大作中提到】 : I run a similar program and the answer is indeed 7. : The if statement only determines whether "sqfeet bedrooms baths street $ : price" will be in the output, but it does not affect the No of observations.
|
|