第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

SAS Proc Freq

標(biāo)簽:
大數(shù)據(jù)

回首页
新建文集
新建文章
在下方新建文章
已保存
SAS Proc Freq
已发布
SAS Day 37

In previous days, we discussed generating Statistical Summary using Proc Means and Proc Univariate for Continuous Variables(Age, BMI, Height, Weight).

Now, there is a question, what procedure should we apply to generate Categorical Variables (Sex, Race, Country)?

Today we will show how to use Proc Freq to summarize the Categorical Variables.

[caption id=“attachment_2305” align=“alignnone” width=“750”]

MichaelGaida / Pixabay[/caption]

Proc Freq:

Sample dataset:

Subjid ID: 1-96
Sex: Female, Male
TRT: Treatment Group 1,2

image

Sample Output:

image

Sample SAS Code:

%macro freq(in= , var= , out1= , out2= , sorter= ); 

proc freq data=&in noprint ; 
tables trt*&var /out=&out1 nopercent; 
run; 

proc sort data=&out1; 
by &var; 
run; 

proc transpose data=&out1 out=&out2(rename=(&var=label)) prefix=c; 
var count; 
by &var; 
id trt; 
run; 

data &out2; 
length label $100.; 
set &out2; 
sorter=&sorter; 
if sorter2=. then sorter2=2; 
drop _name_ _label_;
run; 
%mend freq; 

%freq(in=adsl, var=sex, out1=s1, out2=s, sorter=2);

Warm Attention: This Macro Freq I generated based on my interest, maybe you can add and subtract to tailor your needs.

點擊查看更多內(nèi)容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優(yōu)質(zhì)文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學(xué)習(xí),寫下你的評論
感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊有機(jī)會得

100積分直接送

付費專欄免費學(xué)

大額優(yōu)惠券免費領(lǐng)

立即參與 放棄機(jī)會
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號

舉報

0/150
提交
取消