Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

*Question 1:===========*/ /*Use cards or datalines to read the following data in

ID: 2907347 • Letter: #

Question

*Question 1:===========*/
/*Use cards or datalines to read the following data into SAS. This data set records the body weights of individuals at the beginning of every month
over seven months for a weight-loss program. Please use one data step to create a SAS data set that shows the number of months it takes
for each individual to lose his/her first twenty pounds. Note that no weight values from the original data set should be explicitly referenced in the program.

John 238 223 214 199 195 188 180
Karen 183 175 176 168 163 155 148
Sam 165 168 172 166 155 148 142
*/

Explanation / Answer

solution:

with data step we create dataset

with input statement we define variabes

with cards stattement we define data

There are two data types namely charater and numeric .

character datatype represented by $.

by default data type is numeric.
Ever program statemnt ends with semicolon.

sas program is

data weightloss;

infile cards;

inut name $ month1-month7;

cards;

John 238 223 214 199 195 188 180
Karen 183 175 176 168 163 155 148
Sam 165 168 172 166 155 148 142

;

run;