This script analyzes biological assay data (Ames salmonella assay). It begins by creating an internal dataset, then fits several models: a simple Poisson regression, a two-component Poisson mixture model with constrained effects (via EQUATE and RESTRICT), and finally examines the impact of an outlier by refitting the models on a subset of data.
Data Analysis
Type : CREATION_INTERNE
The 'assay' data is created directly in the script using a DATA step and the DATALINES statement.
1 Code Block
DATA STEP Data
Explanation : Creation of the 'assay' dataset containing quinoline doses and observed colony counts. The 'logd' variable (log of dose) is calculated.
Copied!
data assay;
label dose = 'Dose of quinoline (microg/plate)'
num = 'Observed number of colonies';
input dose @;
logd = log(dose+10);
do i=1 to 3; input num @; output; end;
datalines;
0 15 21 29
10 16 18 21
33 16 26 33
100 27 41 60
333 33 38 41
1000 20 27 42
;
1
DATA assay;
2
label dose = 'Dose of quinoline (microg/plate)'
3
num = 'Observed number of colonies';
4
INPUT dose @;
5
logd = log(dose+10);
6
DO i=1 to 3; INPUT num @; OUTPUT; END;
7
DATALINES;
8
0 152129
9
10161821
10
33162633
11
100274160
12
333333841
13
1000202742
14
;
2 Code Block
PROC FMM
Explanation : Fitting a standard Poisson regression model (k=1 by default) to model colony count as a function of dose.
Copied!
proc fmm data=assay;
model num = dose logd / dist=Poisson;
run;
1
2
PROC FMM
3
DATA=assay;
4
model num = dose logd / dist=Poisson;
5
RUN;
6
3 Code Block
PROC FMM
Explanation : Fitting a two-component Poisson mixture model (k=2). The 'equate=effects(dose logd)' option forces the regression coefficients for 'dose' and 'logd' to be identical across both mixture components.
Copied!
proc fmm data=assay;
model num = dose logd / dist=Poisson k=2
equate=effects(dose logd);
run;
1
PROC FMMDATA=assay;
2
model num = dose logd / dist=Poisson k=2
3
equate=effects(dose logd);
4
RUN;
4 Code Block
PROC FMM
Explanation : An alternative to the EQUATE option using the RESTRICT statement to force parameter equality between the two components (dose 1 = dose 2 and logd 1 = logd 2).
Explanation : Refitting the two-component Poisson mixture model (k=2) excluding an outlier observation (num=60) to see its impact on the fit.
Copied!
proc fmm data=assay(where=(num ne 60));
model num = dose logd / dist=Poisson k=2
equate=effects(dose logd);
run;
1
PROC FMMDATA=assay(where=(num ne 60));
2
model num = dose logd / dist=Poisson k=2
3
equate=effects(dose logd);
4
RUN;
6 Code Block
PROC FMM
Explanation : Refitting the simple Poisson model excluding the outlier observation.
Copied!
proc fmm data=assay(where=(num ne 60));
model num = dose logd / dist=Poisson;
run;
1
2
PROC FMM
3
DATA=assay(where=(num ne 60));
4
model num = dose logd / dist=Poisson;
5
RUN;
6
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.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.