Help using Base SAS procedures

How to run a regression?

Reply
Frequent Contributor
Posts: 75

How to run a regression?

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!

Respected Advisor
Posts: 2,655

Re: How to run a regression?

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

Steve Denham

Ask a Question
Discussion stats
  • 1 reply
  • 159 views
  • 0 likes
  • 2 in conversation