Published on :

Sans titre

This code is also available in: Deutsch Español Français
Awaiting validation
1 Code Block
DATA STEP Data
Copied!
1DATA catch;
2 INPUT gender $ age count @code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json;
3 DATALINES;
4 F 54 18 M 37 0 F 48 12 M 27 0
5 M 55 0 M 32 0 F 49 12 F 45 11
6 M 39 0 F 34 1 F 50 0 M 52 4
7 M 33 0 M 32 0 F 23 1 F 17 0
8 F 44 5 M 44 0 F 26 0 F 30 0
9 F 38 0 F 38 0 F 52 18 M 23 1
10 F 23 0 M 32 0 F 33 3 M 26 0
11 F 46 8 M 45 5 M 51 10 F 48 5
12 F 31 2 F 25 1 M 22 0 M 41 0
13 M 19 0 M 23 0 M 31 1 M 17 0
14 F 21 0 F 44 7 M 28 0 M 47 3
15 M 23 0 F 29 3 F 24 0 M 34 1
16 F 19 0 F 35 2 M 39 0 M 43 6
17;
2 Code Block
PROC FMM
Copied!
1PROC FMM DATA=catch;
2 class gender;
3 model count = gender*age / dist=Poisson;
4RUN;
3 Code Block
PROC FMM
Copied!
1PROC FMM DATA=catch;
2 class gender;
3 model count = gender*age / dist=Poisson ;
4 model + / dist=Constant;
5RUN;
4 Code Block
PROC FMM
Copied!
1PROC FMM DATA=catch seed=12345;
2 class gender;
3 model count = gender*age / dist=Poisson;
4 model + / dist=constant;
5 performance cpucount=2;
6 bayes;
7RUN;
5 Code Block
PROC FMM
Copied!
1ods graphics on;
2ods select TADPanel;
3PROC FMM DATA=catch seed=12345;
4 class gender;
5 model count = gender*age / dist=Poisson;
6 model + / dist=constant;
7 performance cpucount=2;
8 bayes;
9RUN;
10ods graphics off;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.