Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP ME WRITE IT ON SAS DEMAND PLEASE SAS Program. Please write the full code! Assignment: -Generate box plots of mortality and water hardness

PLEASE HELP ME WRITE IT ON SAS DEMAND PLEASE

SAS Program. Please write the full code!

Assignment:

-Generate box plots of mortality and water hardness by location (use proc boxplot).

-Use proc univariate to compare the distribution of water hardness to the log normal and exponential distributions.

-Produce histograms of both mortality and water hardness with, in each case, a kernel density estimate of the variables' distribution superimposed.

-Produce separate surface plots of the estimated bivariate densities of northern and southern towns.

-Reproduce the scatterplot in display 2.10 with added linear regression fits of mortality and hardness for both northern and southern towns.

I wrote these 2 codes and it didn't work:

1st

proc boxplot data=sashelp.heart; plot mortality*hardness; run; proc univariate data=sashelp.heart; var hardness; histogram hardness / normal(mu=mean(hardness),sigma=std(hardness)); fit lognormal hardness / distribution(Lognormal); fit exponential hardness / distribution(Exponential); run; proc univariate data=sashelp.heart; histogram mortality / kernel; histogram hardness / kernel; run;

2nd:

proc format;

value $location

'N' = 'Northern'

'S' = 'Southern';

run;

data Mortality;

set 'path/to/mortality.dat';

format Location $location.;

run;

proc boxplot data=Mortality;

plot Mortality*Location / boxstyle=schematic nooutliers;

run;

proc univariate data=Mortality;

var Hardness;

histogram Hardness / normal(mu=mean(Hardness)) exponential(scale=1/mean(Hardness));

run;

proc kde data=Mortality;

bivar Mortality Hardness / plots=surface;

run;

proc sgplot data=Mortality;

scatter x=Hardness y=Mortality;

fit y=Hardness / group=Location;

run;

PLEASE HELP ME WRITE IT ON SAS DEMAND PLEASE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions

Question

What are the arguments for and against a national accounting plan?

Answered: 1 week ago

Question

=+ (a) Show that a trifling set is negligible.

Answered: 1 week ago

Question

Factors Affecting Conflict

Answered: 1 week ago

Question

Describe the factors that lead to productive conflict

Answered: 1 week ago

Question

Understanding Conflict Conflict Triggers

Answered: 1 week ago