BookmarkSubscribeRSS Feed
thdang
Calcite | Level 5

Hi, I would like to run a regression like this one:

proc model data = datain;

    parms labda bm_0 bm_1 bm_2 bm_3 bm_4 bm_5 bm_6 bm_7 bm_8 bm_9 bm_10

            beta_0 beta_1 beta_2 beta_3 beta_4 beta_5 beta_6 beta_7 beta_8 beta_9 beta_10 mean_factor;

    eq.m1 = p_mretrf-beta_0*(labda-mean_factor)-b_0*mkt_rf - beta_0*MDI  ( if id = 0) ........  ;

    eq.m2=mdi*(p_mretrf-beta_0*(labda-mean_factor)-b_0*mkt_rf - beta_0*MDI) ( if id = 0) .......... ;

    fit m1 m2 /gmm kernel=(bart,1,0);

run;

And I want to add the same thing for Id = 1,...,10.

For a normal regression I would include "by id;". But the probleem here is that I just want to have 1 labda for all of them, but different id have different beta's and b's (that is why beta_0 to beta_10).

Can someone please help me with this?

Many thanks!

1 REPLY 1
SteveDenham
Jade | Level 19

For PROC MODEL help, you might want to post this in the Forecasting and Econometrics forum.

Steve Denham

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1719 views
  • 0 likes
  • 2 in conversation