BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cvilme1998
Fluorite | Level 6

Hello,

I am very confused on how to do this with sashelp.bweight. Could someone show me, also is there a textbook or video you would recommend for beginners that could help with this? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
rhaley1821
Obsidian | Level 7

Good evening,

 

Here is a bit of code to get you started. You first want to use proc contents to examine your dataset and see what your variables are like. From there, the first set of figures are a three way cross tabulation with proc freq, and the next a proc univariate output. Each set of outputs in the pdf will have a title on the top that will give a description of the code used to create the output. Here is a good resource on some basic statistical procedures as well as more info on how to use the "by" "class" and "var" statements. Hope this gets you started!! 

 

cheers,

 

data work.test;
set sashelp.bweight;
run;

proc contents data=sashelp.bweight;
run;

proc freq data=sashelp.bweight;
tables black*married*visit;
run;

proc univariate data=sashelp.bweight;
var weight;
class boy;
run;

 

https://vknight.org/SAS-R/Content/SAS-Chapter-02/ 

View solution in original post

3 REPLIES 3
rhaley1821
Obsidian | Level 7

Good evening,

 

Here is a bit of code to get you started. You first want to use proc contents to examine your dataset and see what your variables are like. From there, the first set of figures are a three way cross tabulation with proc freq, and the next a proc univariate output. Each set of outputs in the pdf will have a title on the top that will give a description of the code used to create the output. Here is a good resource on some basic statistical procedures as well as more info on how to use the "by" "class" and "var" statements. Hope this gets you started!! 

 

cheers,

 

data work.test;
set sashelp.bweight;
run;

proc contents data=sashelp.bweight;
run;

proc freq data=sashelp.bweight;
tables black*married*visit;
run;

proc univariate data=sashelp.bweight;
var weight;
class boy;
run;

 

https://vknight.org/SAS-R/Content/SAS-Chapter-02/ 

cvilme1998
Fluorite | Level 6
Thank you so much for the example codes and a textbook I really appreciate it!!!
ChrisNZ
Tourmaline | Level 20

@rhaley1821 Your helpful answer would be even more helpful if the code was formatted.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 541 views
  • 0 likes
  • 3 in conversation