Question

HELP WITH SAS Run the following DATA step to create a SAS data set called ABC_CORP....

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.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
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;
Add a comment
Know the answer?
Add Answer to:
HELP WITH SAS Run the following DATA step to create a SAS data set called ABC_CORP....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • SASCan someone help me with B part. Please Report 3. A regional SAS conference will be...

    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...

    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...

    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...

    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...

  • (8 points) Read the data contained in the question01.dat file directly from the data file into a temporary SAS data set...

    (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...

    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...

    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....

  • In JAVA 1. Create a class called Rectangle that has integer data members named - length...

    In JAVA 1. Create a class called Rectangle that has integer data members named - length and width. Your class should have a default constructor (no arg constructor) Rectangle() that initializes the two instance variables of the object Rect1. The second overloading constructor should initializes the value of the second object Rect2. The class should have a member function named GetWidth() and GetLength() that display rectangle's length and width. OUTPUT: Rectl width: 5 Rectl length: 10 Enter a width :...

  • I can't attach the data due to the file being real large i can email it...

    I can't attach the data due to the file being real large i can email it to you so i can have your help on it # Assignment 1 # R Programming Language # ---- Why do Exploratory Data Analysis (EDA)? ---- # We will be looking at ## identifying outliers ## null values ## generating plots ## examining correlations # -------------------------------------------------------------- # In this video we will cover: ## univariate plots for continuous variables (boxlots, historgrams) ## bivariate plots...

  • List of Candles Create a class called CandleNode which has fields for the data (a Candle)...

    List of Candles Create a class called CandleNode which has fields for the data (a Candle) and next (CandleNode) instance variables. Include a one-argument constructor which takes a Candle as a parameter. (For hints, see the PowerPoint on "Static vs. Dynamic Structures”.) public CandleNode (Candle c) { . . } The instance variables should have protected access. There will not be any get and set methods for the two instance variables. Create an abstract linked list class called CandleList. This...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT