Programming in SAS Assignment help|Programming in SAS Online Experts|Programming in SAS Homework Help
Get custom writing services for Programming in SAS Assignment help & Programming in SAS Homework help. Our Programming in SAS Online tutors are available for instant help for Programming in SAS assignments & problems. Programming in SAS Homework help & Programming in SAS tutors offer 24*7 services . Send your Programming in SAS assignments at email@example.com or else upload it on the website. Instant Connect to us on live chat for Programming in SAS assignment help & Programming in SAS Homework help.
Sample Assignment in SAS
1. Consider the following small data set :
Kane 20 12 2005 12 25
Ambler 22 12 2005 8 20
Kane 20 01 2006 13 32
Oakey 32 12 2005 30 50
Oakey 32 01 2006 25 45
Ambler 22 01 2006 15 28
Assume that the columns, from left to right, represent one character variable (town name) and five numeric variables (town number, month, year, low daytime temperature (in degrees F) and high daytime temperature (in degrees F)).
a. Use column input to read the data into a permanent SAS data set by reading the data instream. Print the data set.
b. Create a temporary SAS data set from the permanent SAS data set created in part (a). Print the data set.
2. The data set grades.dat  contains grade information on six students. The first two columns contain the student's id number, the third column contains the student's gender, the fourth and fifth columns contain the student's first exam score, the sixth and seventh columns contain the student's second exam score, and the eighth column contains the student's homework grade. Save the file to a convenient location on your computer, and then without editing the file in anyway read the data from the raw data file into a permanent SAS data set. Print the resulting data set.
Once you have successfully created the data set, locate it on your computer, and report the directory location and size of the data set. That is, where is the data set stored and how many kilobytes of space does it consume?
1. Consider the following small data set:
Kane 20 12 2005 12 25
Ambler 22 12 2005 8 20
Kane 20 01 2006 13 32
Oakey 32 12 2005 30 50
Oakey 32 01 2006 25 45
Ambler 22 01 2006 15 28
Assume that the columns, from left to right, represent one character variable (town name) and five numeric variables (town number, month, year, low daytime temperature (in degrees F) and high daytime temperature (in degrees F)). Use list input to read the data ino a permanent SAS data set using a DATALINES statement. Print the data set. Also, create output that displays information about the descriptor portion of your data set. Center your output and set the linesize to no more than 80 characters.
2. The data set rats.dat  contains the following variables, in order, on a set of eight rats:
rat, rat number
dob, date of birth
disease, date of disease
death, date of death
group, treatment group
Save the file to a convenient location on your computer, and then without editing the file in anyway read the data from the ascii file into a temporary SAS data set called rats. You will probably need to access SAS Help and Documentation to learn the appropriate informat to read in the dates. When reading in the data, do what you need to do to read in rat and group, but use a relative pointer control to read in dob and absolute pointer controls to read in disease and death. Print the resulting data set, formatting the variables as necessary so that when printed they make sense. Set your page size to 56, your line size to 78, center the output, and suppress the printing of the date and time that the output was created.
Directions : Type up your answers to the following question in a Word file named homework4_yourPSUid. Copy and paste and then label your SAS program code, the relevant portion of your SAS log window, and the resulting output from SAS into your Word document. Once you have completed the homework problem, upload the file to the Lesson #4 Homework Dropbox.
1. Suppose you have collected the following information on some participants in a diet program:
Variable Name Description Variable type
Subj Programming in SAS no. Character 1 3
Height Height (inches) Character 4 5
Wt_init Initial weight (lbs.) Numeric 6 8
Wt_final Final weight (lbs.) Numeric 9 11
Using the above information, read the data that is contained in dietdata.dat  into a temporary SAS data set called dietdata. Then, add the following three new variables to the data set:
bmi_init, the Programming in SAS's initial body mass index
bmi_final, the Programming in SAS's final body mass index
bmi_diff, the change in the Programming in SAS's body mass index
Body mass index is a person's weight (in kilograms) divided by their height (in meters) squared [Note: only the denominator of the ratio is squared, not the entire ratio, i.e. the units of BMI are kg/m2]. To convert pounds to kilograms, divide pounds by 2.2. To convert inches to meters, multiply inches by 0.0254. Note that large values of body mass index indicate more overweight individuals. Therefore, if the diet program is working, bmi_diff should be negative. Oh, and of course, explicitly convert height to a numeric variable before using it in your calculations. Print your final data set, setting your page size to 58 and line size to 80.
2. Suppose the value of variable abc is 10, the value of variable def is 5, the value of variable ghi is 2, and the variable of jkl is 4. Using an INPUT statement in conjunction with a DATALINES statement, read the values of these four variables into a temporary SAS dataset called temp (which contains only one observation of data). Then, create the following five new variables:
one, which equals abc plus def minus ghi plus jkl (that is, use no parentheses)
two, which equals the sum of ghi and jkl subtracted from the sum of abc and def (that is, use two sets of parentheses)
three, which equals the sum of three things: abc, jkl, and the difference in def and ghi (that is, use one set of parentheses)
four, which equals the sum of three things: abc, jkl, and def divided by ghi (that is, use no parentheses)
five, which equals the sum of abc and def divided by the sum of ghi and jkl (that is, use two sets of parentheses)
Print your resulting data set, setting your page size to 58 and line size to 80. In doing so, appreciate the value and importance of using parentheses to write arithmetic operations in your SAS programs.
1. Dual-photon absorptiometry (DPA) is a method to measure bone mineral density and evaluate the quality of bone being considered for transplant. The DPA technique is expensive and often unavailable. Therefore, an alternative method is to use a bone score based on four less expensive bone quality measures: i) Singh index (singh), ii) CC ratio (ccratio), iii) calcar width (calcar), and iv) cortical shaft index (csi). The data stored in Bonescor2.dat  were collected by Renee Smith of the Bone and Joint Research Lab at the VA Medical Center in Salt Lake City, UT. She used the data to compare the two methods of quantifying bone mineral density. We will use the data here to reinforce the concept of programming for missing values. Oh ... please bear with the details of this homework problem ... it seems longer than it really is.
a. First, read the bone data arising from 30 Programming in SASs that is stored in Bonescor2.dat  into a temporary data set called bonescore1. The first column contains the variable singh, the second column contains the variable ccratio, the third column contains the variable csi, and the fourth column contains the variable calcar. The fifth column contains the bone score (bone) that Renee Smith formulated from the first four measures, and the sixth column contains the gold standard dual-photon absorptiometry (dpa) measures. When reading in the data, take note that there are a few missing values in the data set.
After, you've successfully read in the data, create four new variables in your bonescore1 data set: flag1, flag2, flag3, and flag4 according to the following specifications:
Value of flag variable
Flag variable 1 2 3
flag1 singh ≤4 4 < singh ≤5 singh > 5
flag2 ccratio > 0.67 0.52 < ccratio ≤0.67 ccratio ≤0.52
flag3 csi ≤0.55 0.55 < csi ≤0.65 csi > 0.65
flag4 calcar ≤6 6 < calcar ≤7 calcar > 7
So, for example, flag1 should be assigned the value 1 if singh is less than or equal to 4, flag1 should be assigned the value 2 if singh is greater than 4, but less than or equal to 5, and flag1 should be assigned the value 3 if singh is greater than 5.
In writing the necessary if-then-else statements to create the four new variables intentionally fail to program for missing values. That is, for example, your if-then-else statement for the creation of flag1 should contain just three lines — one if condition, and two else-if conditions. Similarly, the if-then-else statements for the creation of flag2, flag3, and flag4 should each contain three lines. After you've created the four flag variables, create a fifth new variable called ourscore, which is merely the sum of the four flag variables. Print the bonescore1 data set, and observe that one of the values for flag1 and one of the values for flag3 have been improperly assigned. Why? Also note that the errors in flag1 and flag3 also cause errors in the ourscore variable. Why?
b. Now, let's try to fix the errors in our last if-then-else statements. Create a new data set called bonescore2 by re-reading the data contained in Bonescor2.dat . Copy your if-then-else statements from your bonescore1 data step into your bonescore2 data step. Edit the if-then-else statements by adding an else-if condition to the end of each one that supposedly programs for missing values. For example, add:
else if singh = . then flag1 = .;
to the end of your if-then-else statements that create the flag1 variable. Make a similar mistake while attempting to program for missing values when creating each new flag variable. Print the bonescore2 data set, and observe that one of the values for flag1 and one of the values for flag3 are still improperly assigned. Why is this the case? Again note that the errors in flag1 and flag3 have been propagated to the ourscore variable.
c. Okay, let's finally get it right! Create a new data set called bonescore3 by re-reading the data contained in Bonescor2.dat . Copy your if-then-else statements from your bonescore1 data step into your bonescore3 data step. Now, edit the if-then-else statements by placing the missing value conditions in the correct locations.
SAS Import Wizard Instructions, SAS syntax, entering your own data, and Input Statements, Categorical data and working with dates and longitudinal data. Proc Format, Sub-setting, Merging, Intro to construction of Flat Files from Vertical files and vice versa, Output Statements and the Output Delivery System (ODS), Proc gPlot Demo Code, ODS Demo Code, SAS Functions, Arrays and Advanced Analysis Data Set Creation, AP Data, Proc Tabulate, Tabulate SAS Demo, SUGI Fun SAS Demo, Intro. To Macro Programming, Debugging your SAS Program & Student Presentations.
Programming in SAS Assignment as a Service questions help services by live experts :
- 24/7 Chat, Phone & Email support
- Monthly & cost effective packages for regular customers
- Live help for Programming in SAS as a Service online quiz & online tests
If you are facing any difficulty in your Programming in SAS Software as a Service assignment questions then you are at the right place. We have more than 3000 experts for different domains.
Some of the homework help topics include :
- SAS Windows Environment, SAS Data Set, SAS libraries, Verifying data, Summarizing data, descriptive statistics, continuous variables, Creating Formats Labels, Selecting variables, observations in SAS, Conditional processing, Performing Iterative Processing, Working with Data , Descriptive Statistics, Categorical variables,, Bivariate Association, Summarizing data, Inferential statistics, Regression analysis, Production Possibilities Frontier, Opportunity Cost, Efficiency, Growth, Marginal Benefit, Marginal Cost, Comparative Advantage , Main Terms & Concepts, Absolute Comparative Advantage, Specialization, Trade, Consumption Possibilities Frontie , Demand Curve
- Quantity Demanded, Supply Curve , Quantity Supplied, Movement Along , Shifts of a Curve, Market Equilibrium, Equilibrium Price, Quantity, Law of Supply , Demand, Price Elasticity of Demand , Income Elasticity, Cross Price Elasticity, Price Elasticity of Supply, Efficiency and Equity, Main Terms & Concepts, Efficiency, Consumer Surplus, Producer Surplus, Deadweight Loss, Equity, Price Controls , Taxes, Subsidies, Trade in the global market, Integrated Development Environment, Program running, Program Writing, Program debugging, Object-oriented programming, Data types, Sequence, Conditions, Loops
- Classes , Methods, Scope of variables in a program, Data structures, Arrays, Lists, Containers, Writing and running automated tests, Documenting code, Searching, Sorting, Prototyping using wireframes, Testing on a mobile device, Programming, apps for mobile devices, XML databases, SQL databases, submitting a SAS program, SAS program syntax, Accessing Data , SAS data sets, accessing SAS libraries, Producing Detail Reports , subsetting report data, sorting and grouping report data, enhancing reports, Formatting Data Values
Help for complex topics like :
- SAS formats, creating user-defined formats, Reading & customizing SAS Data Sets, Reading Spreadsheet and Database Data, Reading Raw Data Files, reading standard & nonstandard delimited data, handling missing data, Manipulating Data , using SAS functions, conditional processing, Combining Data Sets, concatenating data sets, merging data sets one-to-one, merging data sets one-to-many, merging data sets with nonmatches, FREQ procedure, MEANS and UNIVARIATE procedures, Output Delivery System, structure & types of data, data step and procedures, rules for SAS statements
- SAS environment on PC, running a SAS program, log and output windows, list input, comma and tab delimited data, data from Excel, column input, pointer and informats, reading data from external file, PROC IMPORT, PROC CONTENTS and PROC PRINT, PROC MEANS, UNIVARIATE, SGPLOT, PROC FREQ, SGPLOT, CORR, REG, statistics and graphical displays for categorical data, crosstabulations, correlation, simple regression, ODS graphics, SAS options and comments, direct assignments, if, then, else statements
- SAS functions, handling missing data , PROC FORMAT, titles, labels & FORMAT statement, Working with dates, Sub-setting and merging datasets, SET and MERGE statements, KEEP option and KEEP statement, WHERE statement, permanent SAS dataset, LIBNAME statement, OUTPUT statements on procedures, PROC RANK, Restructuring SAS data-sets, chi-square, T-Tests, ANOVA & Non-parametric tests, GLM, modeling binary data, logistic regression, modeling continuous data, linear regression, life table graphs, PROC LOGIST, PROC REG, PROC LIFETEST, PROC TABULATE, macros and macro variables, Exporting data
- Getting Started with SAS, Getting Around SAS Studio, SAS Programs and Libraries, Basic SAS Syntax
- Data Handling, Dissecting the DATA step, Reading in Files and Datasets, Non-SAS sources, Data extraction, aggregation, joining, Creating and Managing Variables, Transforming Data, Filter and Sorting
- Data Analysis, Descriptive Statistics, Frequency Tables, Distribution Analysis
- Reporting, Creating List Output, Summary Reports, Reporting Output Options, Creating Plots