What we would like to do is create similar tables in an rtf


a) Open SAS. In the editor window type the commands below and save this as ass3.sas in your H:\stats301\A3 directory (if this doesn't exist then create it!):

The TITLE1 command his will ensure that your user ID is on all relevant output - if it is not present students will receive NO MARKS for all work. The LIBNAME statement allows you to save permanent copies of ay data sets you create.

In the following we wish to take you from a specific task to a general solution by identifying the general features that can be transferred across similar enquiries. In particular, we want to automate the production of ‘nice' (.rtf) output from these enquiries via the use of SAS MACROs.

Q1

(a) In the following, we will be re-visiting the data set Stats20x that you investigated in assignment 1. The following code can be use to produce a table of the sample size (n), average (mean) and standard deviation (s) for a numerical variable (in this example exam score) for each level of a classification/factor (in this case whether the student passed the assignment - pass_assign=yes or no). Run the code below to reproduce the outputted table that you see below it.

Code:

PROC TABULATE DATA = stats20x FORMAT=6.2;
CLASS pass_assign;
VAR Exam;
TABLE pass_assign all ,Exam*(N='sample size' Mean='mean' std='std dev');
TITLE 'Pass assignment versus Exam';
RUN;

(b) Run this code again except this time make sure you are creating an .rtf file with the in an appropriate folder with this table in it. 

(c) What we would like to do is create similar tables in an .rtf file that produces the same statistics for any numerical value against each level of a know classification/factor from any data set we wish to inspect.

(d) Hence, create a SAS MACRO that allows you produce the same sort of tables in .rtf format. Produce the MACRO code and illustrate its use by producing 3-4 similar tables for various combinations of numerical and classification variable (One example could be, say, Test versus gender).

Q2 Study the following website on non-linear modelling (as well as the help file for PROC NLIN in SAS);

(a) In no more than one or two paragraphs, and in your own words, (no cut and pasting please) describe how a non-linear model differs from a linear model.

(b) In no more than one or two paragraphs, and in your own words, (no cut and pasting please) describe which components of a non-linear model are the same as for a linear model.

(c) Hence, what criterion is being used to determine the ‘best' estimates?

Solution Preview :

Prepared by a verified Expert
Programming Languages: What we would like to do is create similar tables in an rtf
Reference No:- TGS0768264

Now Priced at $40 (50% Discount)

Recommended (92%)

Rated (4.4/5)