Perform a regression  proc reg data=work.import; model charges = bmi; where type EQ 'train'; /* Use only the 'train' data */ run; Use Excel to fill in PRED   This uses the IF() command. =IF([@TYPE]="pred",[@CHARGES],NA()) Operationalizations   Define the variables appearing in the data set. AGE is the age of the person/case. BMI is the body mass index of the person/case. CHARGES is the dollar amount (the cost) of the medical procedure for the person/case. TYPE is the variable assigning the person/case to training SAS. ·       Assignment of train is used for training SAS. ·       Assignment of pred will be used to predict within Excel. TRAIN is used to plot CHARGES (for training data) in Excel. PRED is used to plot predicted CHARGES in Excel. Data: 27 42.13 $39,611.76 train 39611.7577 #N/A 19 24.6 $1,837.24 train 1837.237 #N/A 52 30.78 $10,797.34 train 10797.3362 #N/A 23 23.845 $2,395.17 train 2395.17155 #N/A 56 40.3 $10,602.39 train 10602.385 #N/A 30 35.3 $36,837.47 train 36837.467 #N/A 60 36.005 $13,228.85 train 13228.847 #N/A 30 32.4 $4,149.74 train 4149.736 #N/A 18 34.1 $1,137.01 train 1137.011 #N/A 34 31.92 $37,701.88 train 37701.8768 #N/A 37 28.025 $6,203.90 train 6203.90175 #N/A 59 27.72 $14,001.13 train 14001.1338 #N/A 63 23.085 $14,451.84 train 14451.8352 #N/A 55 32.775 $12,268.63 train 12268.6323 #N/A 23 17.385 $2,775.19 train 2775.19215 #N/A 31 36.3 $38,711.00 train 38711 #N/A 22 35.6 $35,585.58 train 35585.576 #N/A 18 26.315 $2,198.19 train 2198.18985 #N/A 19 28.6 $4,687.80 train 4687.797 #N/A 63 28.31 $13,770.10 train 13770.0979 #N/A 28 36.4 $51,194.56 train 51194.5591 #N/A 19 20.425 $1,625.43 train 1625.43375 #N/A 62 32.965 $15,612.19 train 15612.1934 #N/A 26 20.8 $2,302.30 train 2302.3 #N/A

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question

 

Perform a regression 

proc reg data=work.import;

model charges = bmi;

where type EQ 'train'; /* Use only the 'train' data */

run;

Use Excel to fill in PRED

 

This uses the IF() command.

=IF([@TYPE]="pred",[@CHARGES],NA())

Operationalizations

 

Define the variables appearing in the data set.

AGE is the age of the person/case.

BMI is the body mass index of the person/case.

CHARGES is the dollar amount (the cost) of the medical procedure for the person/case.

TYPE is the variable assigning the person/case to training SAS.

·       Assignment of train is used for training SAS.

·       Assignment of pred will be used to predict within Excel.

TRAIN is used to plot CHARGES (for training data) in Excel.

PRED is used to plot predicted CHARGES in Excel.


Data:

27 42.13 $39,611.76 train 39611.7577 #N/A
19 24.6 $1,837.24 train 1837.237 #N/A
52 30.78 $10,797.34 train 10797.3362 #N/A
23 23.845 $2,395.17 train 2395.17155 #N/A
56 40.3 $10,602.39 train 10602.385 #N/A
30 35.3 $36,837.47 train 36837.467 #N/A
60 36.005 $13,228.85 train 13228.847 #N/A
30 32.4 $4,149.74 train 4149.736 #N/A
18 34.1 $1,137.01 train 1137.011 #N/A
34 31.92 $37,701.88 train 37701.8768 #N/A
37 28.025 $6,203.90 train 6203.90175 #N/A
59 27.72 $14,001.13 train 14001.1338 #N/A
63 23.085 $14,451.84 train 14451.8352 #N/A
55 32.775 $12,268.63 train 12268.6323 #N/A
23 17.385 $2,775.19 train 2775.19215 #N/A
31 36.3 $38,711.00 train 38711 #N/A
22 35.6 $35,585.58 train 35585.576 #N/A
18 26.315 $2,198.19 train 2198.18985 #N/A
19 28.6 $4,687.80 train 4687.797 #N/A
63 28.31 $13,770.10 train 13770.0979 #N/A
28 36.4 $51,194.56 train 51194.5591 #N/A
19 20.425 $1,625.43 train 1625.43375 #N/A
62 32.965 $15,612.19 train 15612.1934 #N/A
26 20.8 $2,302.30 train 2302.3 #N/A
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Similar questions
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman