Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- PROC FMM: Test Parameters Across Mixtures

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

☑ This topic is **solved**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 06-01-2024 12:17 PM
(289 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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)
```

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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)
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.