Question

*Question 1:===========*/ /*Use cards or datalines to read the following data into SAS. This data set...

*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
*/

Homework Answers

Answer #1

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 have;
input name$ StartWT Month1 Month2 Month3 Month4 Month5 Month6;
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;

Data want (keep=name Lbs_20_Lost_In);
set have;
array loss{6} month1-month6;
do i=1 to 6;
target=startwt-loss{i};
if target >= 20 then do;
Lbs_20_Lost_In=i;
output;
leave;
end;
end;
run;

Know the answer?
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
Similar Questions
Refer to the accompanying data set of mean​ drive-through service times at dinner in seconds at...
Refer to the accompanying data set of mean​ drive-through service times at dinner in seconds at two fast-food restaurants. Construct a 95​% confidence interval estimate of the mean​ drive-through service time for Restaurant X at​ dinner; then do the same for Restaurant Y. Compare the results. Restaurant X Restaurant Y 85 85 116 116 118 118 146 146 270 270 100 100 124 124 156 156 118 118 176 176 184 184 125 125 154 154 166 166 211 211...
Consider the following sample data set, answer the questions using the result of minitab 171 152...
Consider the following sample data set, answer the questions using the result of minitab 171 152 170 168 169 171 190 183 185 140 173 206 172 174 169 199 151 180 167 170 188 Find z-scores for this data set
Refer to the accompanying data set of mean​ drive-through service times at dinner in seconds at...
Refer to the accompanying data set of mean​ drive-through service times at dinner in seconds at two fast food restaurants. Construct a 99​% confidence interval estimate of the mean​drive-through service time for Restaurant X at​ dinner; then do the same for Restaurant Y. Compare the results. Restaurant X      Restaurant Y 82           101 116         128 121         151 148         117 267         179 179         136 119         107 150         119 161         133 210         124 336         129 303         135 173         224 108         216 159         291...
Refer to the accompanying data set of mean​ drive-through service times at dinner in seconds at...
Refer to the accompanying data set of mean​ drive-through service times at dinner in seconds at two fast food restaurants. Construct a 95​% confidence interval estimate of the mean​ drive-through service time for Restaurant X at​ dinner; then do the same for Restaurant Y. Compare the results. Restaurant X Restaurant Y 85 102 125 130 115 149 141 111 265 174 185 138 126 113 151 123 165 131 212 127 337 137 311 139 176 226 117 218 161...
Wellness Data – Cholesterol levels. Here are the wellness data we discussed last week. 205 327...
Wellness Data – Cholesterol levels. Here are the wellness data we discussed last week. 205 327 189 205 148 139 178 157 188 301 195 185 164 182 201 248 298 264 177 169 174 169 155 188 194 192 177 189 188 176 158 305 248 189 209 159 202 177 278 268 166 285 249 203 199 170 165 180 201 209 301 188 165 173 183 206 202 283 207 156 What are the mean, median, mode,...
Consider the following sample data set: 171 132 170 168 169 171 190 183 185 140...
Consider the following sample data set: 171 132 170 168 169 171 190 183 185 140 173 206 172 174 169 199 151 180 167 170 188 Find the 20% and 70% percentile Find q1, q3, IQR, inner fence, outer fence Construct boxplot, and identify outlier
Refer to the accompanying data set of mean drive-through service times at dinner in seconds at...
Refer to the accompanying data set of mean drive-through service times at dinner in seconds at two fast food restaurants. Construct a 99% confidence interval estimate of the mean drive-through service time for restaurant X at dinner then do the same for restaurant Y Restaurant X Restaurant Y 83 101 119 131 116 155 143 111 263 174 178 135 122 111 154 123 166 128 215 128 328 131 303 136 179 230 109 217 154 296 149 126...
Here is a data set: 123 139 165 168 155 108 258 130 183 157 137...
Here is a data set: 123 139 165 168 155 108 258 130 183 157 137 93 188 154 188 172 195 133 99 134 160 119 132 178 153 63 179 109 The goal is to construct a grouped frequency distribution table (GFDT) for this data set. The GFDT should have 10 classes with a "nice" class width. Each class should contain its lower class limit, and the lower class limits should all be multiples of the class width....
Here is a data set: 123 139 165 168 155 108 258 130 183 157 137...
Here is a data set: 123 139 165 168 155 108 258 130 183 157 137 93 188 154 188 172 195 133 99 134 160 119 132 178 153 63 179 109 The goal is to construct a grouped frequency distribution table (GFDT) for this data set. The GFDT should have 10 classes with a "nice" class width. Each class should contain its lower class limit, and the lower class limits should all be multiples of the class width....
A survey on men and women’s shopping behavior collected data from a sample of 50 men...
A survey on men and women’s shopping behavior collected data from a sample of 50 men and 50 women. The following data on online shopping spending every month. Men Women 148 272 211 176 256 251 309 235 190 145 205 179 203 30 208 135 231 200 125 270 149 174 205 123 195 199 178 195 196 192 198 102 110 110 199 184 181 228 168 316 218 170 222 234 206 163 168 245 239 174...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT