Base SAS Programming - Lecture 6 (Continued on Vimeo -see description)

Base SAS Programming - Lecture 6 (Continued on Vimeo -see description)

Learn Analytics

8 лет назад

2,648 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@sarankumar4780
@sarankumar4780 - 01.02.2017 12:44

How many models are there under 'Luxury'?

data cars_cat (keep = invoice inv_cat);
set sashelp.cars;
if invoice > 50000 then
do;
inv_cat = 'Luxury';
output cars_cat;
end;
run;

Ответить
@sarankumar4780
@sarankumar4780 - 01.02.2017 12:56

data cars_cat (keep = Make Model MPG_City MPG_Highway Mileage_cat);
set sashelp.cars;
if MPG_City > 50 then Mil_cat = 'Very High';
else if MPG_City >= 20 and MPG_City <= 50 then Mileage_cat = 'High';
else if MPG_City < 20 and MPG_City > 10 then Mileage_cat = 'Mid';
else if MPG_City <= 10 then Mileage_cat = 'Low';
run;

Ответить