A00-231 無料問題集「SASInstitute SAS 9.4 Base Programming - Performance-based」
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"
The following SAS program is submitted using the raw data file as input:
data work.condo_ranch;
infile 'file-specification' dsd;
input style $ @;
if style = 'CONDO' or style = 'RANCH' then input sqfeet bedrooms baths street $ price : dollar10.; run; How many observations does the WORK.CONDO_RANCH data set contain?
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"
The following SAS program is submitted using the raw data file as input:
data work.condo_ranch;
infile 'file-specification' dsd;
input style $ @;
if style = 'CONDO' or style = 'RANCH' then input sqfeet bedrooms baths street $ price : dollar10.; run; How many observations does the WORK.CONDO_RANCH data set contain?
正解:C
解答を投票する
Scenario:
This project will use data set cert.input08a and cert.input08b. At
any time, you may save your program
as program08 in cert\programs.
Both data sets contain a common numeric variable named ID.
Write a program that will use a SAS DATA Step to:
* Combine data sets cert.input08a and cert.input08b by
matching values of the ID variable.
* Write only observations that are in both data sets to a
new data set named results.match08.
* Write all other non-matching observations from either
data set to a new data set named results.nomatch08.
* Exclude all variables that begin with
"ex" from results.nomatch08.
How many observations (rows) are inresults.nomatch08?
This project will use data set cert.input08a and cert.input08b. At
any time, you may save your program
as program08 in cert\programs.
Both data sets contain a common numeric variable named ID.
Write a program that will use a SAS DATA Step to:
* Combine data sets cert.input08a and cert.input08b by
matching values of the ID variable.
* Write only observations that are in both data sets to a
new data set named results.match08.
* Write all other non-matching observations from either
data set to a new data set named results.nomatch08.
* Exclude all variables that begin with
"ex" from results.nomatch08.
How many observations (rows) are inresults.nomatch08?
正解:
2
Explanation:
proc sort data=cert.input08b out=work.input08b;
by ID;
run:
SAS code that could be used to solve this project:
proc sort data=cert.input08a out=work.input08a;
by ID;
run:
data results.match08 results.nomatch08 (drop=ex: );
merge work.input08a (in=a) work.input08b (in=b);
by ID;
if a and b then output results.match08;
else output results.nomatch08;
run;
proc contents data=results.match08;
run;
proc contents data=results.nomatch08;
run;
The correct answer is: 2
Explanation:
proc sort data=cert.input08b out=work.input08b;
by ID;
run:
SAS code that could be used to solve this project:
proc sort data=cert.input08a out=work.input08a;
by ID;
run:
data results.match08 results.nomatch08 (drop=ex: );
merge work.input08a (in=a) work.input08b (in=b);
by ID;
if a and b then output results.match08;
else output results.nomatch08;
run;
proc contents data=results.match08;
run;
proc contents data=results.nomatch08;
run;
The correct answer is: 2
The contents of the raw data file FURNITURE are listed below:
--------10-------20-------30
chair,,table
chair,couch,table
The following SAS program is submitted:
data stock;
infile 'furniture' dsd;
input item1 $ item2 $ item3 $;
run;
Which one of the following is the value of the variable named ITEM2 in the first observation of the output data set?
--------10-------20-------30
chair,,table
chair,couch,table
The following SAS program is submitted:
data stock;
infile 'furniture' dsd;
input item1 $ item2 $ item3 $;
run;
Which one of the following is the value of the variable named ITEM2 in the first observation of the output data set?
正解:B
解答を投票する