HELP WITH SAS
Run the following DATA step to create a SAS data set called ABC_CORP. Create a new sas data set called AGES that contains all the variables in ABC_CORP plus three new variables. One is AGE_ACTUAL, which is the exact age from DOB to January 15, 2005. The second is AGE_TODAY, which is the age as of the date the program is run, rounded to the nearest tenth of the year. The third is AGE, with the fractional part dropped, as of the date stored in the variable VISIT_DATE. Print out a listing of the new data set.
data ABC_CORP;
Do SUBJ = 1 to 10;
DOB = INT (RANUNI(1234)*15000);
VISIT_DATE = INT (RANUNI (0)*1000) + '15JAN2005'D;
OUTPUT;
END;
FORMAT DOB VISIT_DATE DATE9.;
stop;
RUN;
HELP WITH SAS Run the following DATA step to create a SAS data set called ABC_CORP....
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...
Which of the following SAS programs would NOT create a SAS data set consisting only of observations with the variable color equal to red? (The answer is not C I am getting the question wrong. Please help a. DATA favorites (WHERE=(color='red')); SET class; RUN; b. DATA favorites; SET class; IF color = 'red'; RUN; c. All of these programs create a SAS data set consisting only of observations where color is equal to red. d. PROC PRINT DATA=class; WHERE color='red';...
SASCan someone help me with B part. Please
Report 3. A regional SAS conference will be held in a few weeks time. The raw data file Conference.cav contains information about the registered attendeos: first name, last name, attendeo ID, business phone, home phone, mobile phone, OK to contact attendee at business (Yes/No), OK to contact at home (Yes/No), OK to contact attendee at mobile (Yes/No), registration rate, will attend Wednesday mixer (Yes/No), will attend Thursday lunch (Yes/No), willing to volunteer...
You will create a new project. Type in the following program and run it to produce the output for the program. Good practice in writing a program in any language, including Python, is to add comments for each line and state clearly what is the program input and output. Your program must include comments, so a reader will know exactly what you are trying to do in each line of code and allow for easy maintenance. Beginning a line with...
In SAS coding, need serious
help.
The following character strings are the observations. Every string contains three types of information: STATE(NY or NJ), N(the number between the letters) and GROUP(A or B). Write a SAS code to create a data set named "string" containing four variables: STATE, N, GROUP and NEWN, in which NEWN = N*100 if GROUP= 'A' and NEWN = N*10 if GROUP= 'B'. (hint: use SUBSTR function to obtain STATE, N, and GROUP) NY113A NY15B NJ10A NY34A...
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...
Java: Create a class called Vehicle with the following features: a. It has three private data members (instance variables): one is the manufacturer’s name (String manufacturer), the second is the number of cylinders in the engine (int cylinder), and the third is the owner (Person owner). The class Person is described above. b. It has three constructors, a no-argument constructor, a constructor with three parameters, and a copy constructor. The no-argument constructor will set the manufacturer to “None”, cylinder to...
(8 points) Read the data contained in the
question01.dat file
directly from the data file into a
temporary SAS data set called question01.
The data in each record are in order: golf course (name),
number of holes (holes), par (par), total yardage
(yardage), and greens fees (fees). Print the
resulting SAS data set ensuring that the output is centered, your
page size is no larger than 58 lines, and the linesize no longer
than 80 characters. When you print the...
Write a R code for the following Using the SATGPA data set in Stat2Data package. Test by using α= .05. 1) Create the following three variables and then print out all the six variables. Create a new variable “SAT”, which is the sum of MathSAT and VerbalSAT. Create second new variable “SATLevel”, and assign the value of “SATLevel” as 1 when SAT<=1100, 2 when 11001300. Create third new variable “GPALevel” and assign the value of “GPALevel” as 1 when GPA<=2.8,...
Code should be in C# Create a class called SavingsAccount. Use a static variable called annualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsBalance, indicating the amount the saver currently has on deposit. Provide method CalculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12 – this interest should be added to savingsBalance. Provide static method setAnnualInterestRate to set the annualInterestRate to a new value....