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

Hello,

 

I am running a two-component mixture model via PROC FMM, and want to compare the coefficient of a variable from the first component to the coefficient of the same variable in the second component. I noticed PROC FMM does not have an ESTIMATE or CONTRAST statement available, and I am wondering if it is otherwise possible to implement this comparison. Using the example below, I would like to compare the coefficient for 'dose' in component 1 to the coefficient for 'dose' in component 2 (and ideally get a confidence interval as well). I appreciate any suggestions. 

 

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
;
run;

proc fmm data=assay;
   model num = dose logd / dist=Poisson k = 2;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

You can use the NLEST macro after saving the parameter estimates table and the covariance matrix table (which must be requested with the COV option). As described in the macro documentation, when using the inest= and incovb= options, as is required here since FMM does not support the STORE statement, it is important to make the parameter estimates and covariance matrix data sets compatible. You can see by examining them that this requires dropping the last row and column of the covariance matrix data set. And the extraneous numeric variables in that data set must also be dropped, which can be done with the covdrop= option. So, the following makes the comparison you want.

proc fmm data=assay cov;
   model num = dose logd / dist=Poisson k = 2;
   ods output parameterestimates=pe cov=cov(where=(modelno=1));
run;
%nlest(inest=pe,incovb=cov,covdrop=modelno component col7,f=b_p2-b_p5)

View solution in original post

2 REPLIES 2
StatDave
SAS Super FREQ

You can use the NLEST macro after saving the parameter estimates table and the covariance matrix table (which must be requested with the COV option). As described in the macro documentation, when using the inest= and incovb= options, as is required here since FMM does not support the STORE statement, it is important to make the parameter estimates and covariance matrix data sets compatible. You can see by examining them that this requires dropping the last row and column of the covariance matrix data set. And the extraneous numeric variables in that data set must also be dropped, which can be done with the covdrop= option. So, the following makes the comparison you want.

proc fmm data=assay cov;
   model num = dose logd / dist=Poisson k = 2;
   ods output parameterestimates=pe cov=cov(where=(modelno=1));
run;
%nlest(inest=pe,incovb=cov,covdrop=modelno component col7,f=b_p2-b_p5)
jl4443
Fluorite | Level 6

This is exactly what I was looking for. Thank you!

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 243 views
  • 3 likes
  • 2 in conversation