Write a SAS macro called descripstat that will calculate a descriptive statistic for a variable, in an arbitrary SAS data set. The statistic, the variable, and the name of the data set should be macro parameters. The descriptive statistic should be one that can be calculated by PROC MEANS. Have the macro include a title on the output that describes exactly what is being calculated.
Following code will give a macro to get the specified statistic from PROC MEANS.

If we need to calculate mean for the variable age from the data set class1 then the above macro is called as below
%descripstat(statistic=mean,varname=age,dataname=class1);
Write a SAS macro called descripstat that will calculate a descriptive statistic for a variable, in...
The following problem will use the sashelp.baseball data set that is already in SAS Write a SAS macro called descripstat that will calculate a descriptive statistic for a variable, in an arbitrary SAS data set. The statistic, the variable, and the name of the data set should be macro parameters. The descriptive statistic should be one that can be calculated by PROC MEANS. Have the macro include a title on the output that describes exactly what is being calculated. [Hint:...
Run this program to create a permanent SAS data set called Survey2007. Close your SAS session, open up a new session, and write the statements necessary to compute the mean age. * Write your LIBNAME statement here; data –fill in your data set name here- ; input Age Gender $ (Ques1-Ques5)($1.); /* See Chapter 21, Section 14 for a discussion of variable lists and format lists used above */ datalines; M 15243 30 F 111 42 M 23555 48 F...
SAS BASE PROGRAMMING Q
proc contents data-data1.admit; run; Select one: a. Creates a report containing summary statistics b. Creates a report containing status messages regarding execution c. Creates a report containing the variable attributes O d. Creates a report containing the observations data NULL; Select one: a. Instructs SAS to write output to the NULL data set in the work library. b. None of the other choices C. Instructs SAS to write output without creating a data set. d. Is...
14. Write a SAS program to do the following tasks in order. You must label each question in the program by using comment statement like /* Q14a */ on the line where your answers to Q14a begin. a. Define the Library Q14A using LIBNAME statement to connect to the SASData folder inside STA575 folder on the U-drive. b. Define the Library Q14B using LIBNAME statement to connect to a new folder Q14DATA inside STA575 folder on the U-drive. Create a...
Statistics Macro Assignment
Write a macro to find the number of observations, max, min, sum,
average and standard deviation for a column of numbers with any
number of observations starting in cell A1 and proceeding downward.
The number set will be of any length and include negative, zero,
and positive integers. Display the results as shown below. Use the
numbers below as an example.
You may use the key board code “Selection.End(xlDown).Select” if
you wish. Otherwise, use only VBA code...
Copy/paste this data on online orders into SAS. Write a program that will read it including date informats; create a variable, called WaitTime, that is the number of days between Order and Delivery. Use an IF statement to give a value of 0 if the Delivery date is missing; recode the categories of method of payment, changing C to Credit and P to Paypal; print the data set using a different date format than the informat; and do proc means...
USING MATLAB...Write a function that creates a structure variable called createSpacecraft. The function should take four inputs, a number called mass (in kg), a number called fuel (in joules of energy), a number called orbit (in meters), and a number called engine (in newtons). It should return an output structure called spacecraft containing each of those values. Please ensure that both the function name, AND the names of variables within the spacecraft structure are exactly as instructed
C++ Assignment: Create a class called FitnessMember that has only one variable, called name. The FitnessMember class should have a constructor with no parameters, a constructor with a parameter, a mutator function and an accessor function. Also, include a function to display the name. Define a class called Athlete which is derived from FitnessMember. An Athlete record has the Athlete's name (defined in the FitnessMember class), ID number of type String and integer number of training days. Define a class...
C++, entry level no pointers or vectors. Write a class called Person that has two data members - a string variable called name and a double variable called age. It should have a constructor that takes two values and uses them to initialize the data members. It should have get methods for both data members (getName and getAge), but doesn't need any set methods. Write a separate function (not part of the Person class) called stdDev that takes two parameters...
SAS code for problem:
title 'grocery questions';
data a; /* This data set will be a temporary sas file with
name
'a' . In this example we don't need to refer to this
name as if there is only one temporary sas file in use,
any procedure will automatically use it. */
input y x1 x2 x3 ; /* names input variables */
cards;
4264 305657 7.17 0
4496 328476 6.2 0
4317 317164 4.61 0
4292 366745 7.02 0...