Question

In: Statistics and Probability

sas questions What options would you specify to direct a proc print statement to print only...

sas questions

What options would you specify to direct a proc print statement to print only observations 5 through 10?

How do you get the last word of a text string? Write a statement to show your answer.

Describe the difference between using proc means and the mean function to compute a mean.

Describe the role of the input and infile statements in a data step that reads an external data file.

Write the SAS code required to write the SAS data set dogs_data (assume in the work library) to an excel file called dogsdatafile.xlsx in a worksheet called Dogs Data

Solutions

Expert Solution

Ans(a)

This statement prints only observations 5 through 10 in data set STUDY:

 proc print data=study(firstobs=5 obs=10);

Ans:-

DATA one;

String = ' I am a teacher' ;

lastword = Scan( String, -1, ' ' ) ;

put lastword = ;

run ;

the lastword return teacher

(c) By default Proc Means calculate the summary statistics like N, Mean, Std deviation, Minimum and maximum, Where as Mean function compute only the mean values.

(d) The INFILE statement describes the attributes of the external file containing the raw data that you want the DATA step to read. The INFILE statement can either directly name the external file or it can indirectly point to the external file with a fileref defined with the FILENAME statement or window.

With the INPUT statement, you describe to SAS the structure of your data. An INPUT statement that uses simple list input may be able to read your external file by scanning the data lines for data values if your data values are separated by at least one delimiter such as a space.

And (e)

PROC EXPORT data = dogs_data

OUTFILE = ":C/dogsdatafile.xlsx"

DBMS = .xlsx

SHEET = " Dogs Data"

run;


Related Solutions

Using the information provided by the Statement of Cash Flows, specify two questions that you would...
Using the information provided by the Statement of Cash Flows, specify two questions that you would ask management if you were a financial analyst attempting to issue a buy / sell recommendation to clients. Explain why you would ask each question. The Shelburne, Vermont, company’s primary markets are New York, Boston, and Chicago. Sales have jumped dramatically in recent years. Such dramatic growth has significant implications for cash flows. Provided below are the operating sections of the most recent two...
Which of the following SAS statement(s) could not be used under “Proc Means” Step? Check all...
Which of the following SAS statement(s) could not be used under “Proc Means” Step? Check all that apply. A. CLASS Statement B. BY Statement C. TITLE Statement D. VAR Statement E. WHERE Statement F. TABLES Statement
Read the examples below, and specify which mode you would recommend. If you choose intermodal, specify...
Read the examples below, and specify which mode you would recommend. If you choose intermodal, specify the combination of modes that you would use. Alternative Scenarios: Coal (over 1000 miles, same land mass) Human organs used for transplant within the same country/continent (over 1000 miles) Tens of thousands of pounds of grain used for production of beer (over 1000 miles) 5,000 lbs. (2271 kilos) specialized parts used in manufacturing equipment (average value) When designing a network of distribution centers to...
If possible, please answer all 4 questions. Thanks! :) 35. What file in the /proc directory...
If possible, please answer all 4 questions. Thanks! :) 35. What file in the /proc directory can be used to list the features supported by your system’s CPU? 36. Which of the following commands can be used to insert a kernel module into the Linux kernel? (Choose all that apply.) a. insmod b. modprobe c. lsmod d. depmod
Which of the following would you find on the Statement of Equity? Question 22 options: 1)...
Which of the following would you find on the Statement of Equity? Question 22 options: 1) Capital stock 2) Income tax expense 3) Gain on sale of building 4) Dividends paid 5) Retained earnings 6) Sales 7) Salary expense 8) Cash 9) Net income 10) Loss on sale of investment
Instructions:  Code a for statement that increments from 1 through 10, but print only the even numbers...
Instructions:  Code a for statement that increments from 1 through 10, but print only the even numbers using a fall-thru switch. You can catch the odd numbers using the option in the switch that handles everything else. Name your program ForFallThruSwitch.java. Use Java Style Guide in line advancing and spacing. --------------------OUTPUT RESULTS-------------------- Not printing odd numbers! 2 is an even number. Not printing odd numbers! 4 is an even number. Not printing odd numbers! 6 is an even number. Not printing...
Hw questions 1. Write a single C++ statement that will:      Print the string “C++” using the...
Hw questions 1. Write a single C++ statement that will:      Print the string “C++” using the variable:       string s = “Introduction to C++”. 2. Change the letter ‘c’ to ‘C in the following string:    Reprint the string with “C”  given the code and using the string: string greeting = “Introduction to c++” 3. Write the C++ statement or statements that will:    Print the answer for regular division of the real numbers a / b + c and print the answer for integer...
Provide a scenario of what options you would explore in the event that you became ineligible...
Provide a scenario of what options you would explore in the event that you became ineligible to access your current health insurance policy
1) Assume that you are a speculator. What would you choose in terms of instruments: options...
1) Assume that you are a speculator. What would you choose in terms of instruments: options or futures/ forwards? Explain your answer. Also if you believe that there is a trade-off between the two, clearly explain the cases when you would use one over the other? a. ) Answer question 1 from the perspective of a US MNC
Answer the following questions about AD, SAS, and LAS: a) What does the AD curve show?...
Answer the following questions about AD, SAS, and LAS: a) What does the AD curve show? (Hint: What is true at every point along the AD curve?) b) Does the SAS curve slope upward or downward? Why is it sloped that way? Explain. c) Predict, with the aid of the IS-LM and the SAS-AD models, the short-run and long-run results when consumer optimism increases. Assume the economy is initially in long-run equilibrium at the natural real GDP. ** Make sure...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT