BookmarkSubscribeRSS Feed
yuhhwa
Calcite | Level 5

in case of  multiple variables(+100 variables),the following statement is OK?

 

proc fmm data=XXX;
class XXX;←think separately about model?
model A=,B=C=,・・・・・・ = / k=X;
run;

2 REPLIES 2
Rick_SAS
SAS Super FREQ

Your statements are not valid syntax.

1. How does the classification variable enter the models?

2. The K= option requires a constant value, such as K=2 or K=3. 

3. You cannot use commas to separate models. You cannot put multiple models on one MODEL statement.

 

It is not clear what you are trying to accomplish, but here is a guess.

A. It looks like you might have many response variables named Y1, Y2, Y3, ..., Y100

B. It looks like you are trying to fit them all with a mixture of k Gaussian distributions.

 

If those assumptions are correct then you should convert your data from wide to long format. Let Y be the name of the long variable that contains the values for variables Y1, ..., Y100 and let B be an indicator variable that indicates which observations correspond to which variables. Then you can use syntax such as the following:

 

proc fmm data=LongData plots=none;
   by B;
   model Y= / k=2;
run;

Almost surely you do not want 100 pages of output, so you should suppress ODS output and write the results (parameter estimates?) to a data set. You should study the techniques in the following articles:

Simulation in SAS: The slow way or the BY way

Turn off ODS when running simulations in SAS

An easy way to run thousands of regressions in SAS

 

 

yuhhwa
Calcite | Level 5

thank you for replying.

 

>>It is not clear what you are trying to accomplish, but here is a guess.

A. It looks like you might have many response variables named Y1, Y2, Y3, ..., Y100

B. It looks like you are trying to fit them all with a mixture of k Gaussian distributions.

 

A and B is  right, but I want to cluster combination of multiple variables as well as k-means.

 

   proc fastclus data=stan out=clust maxclusters=3;
      var v1 v2 v3;
   run;

I think the way you taught me is to cluster variables separately. Is it right?

 

if you are OK,please tell me  how shoud I wright the statement Gaussian mixture model  compared with k-means.

 

thank you in advance.

 

 

 

 

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1324 views
  • 0 likes
  • 2 in conversation