BookmarkSubscribeRSS Feed
RBA
Fluorite | Level 6 RBA
Fluorite | Level 6

Hello, I am trying to use tmodel to estimate a demand model with endogenous prices and a random price coefficient. It works, but I have not been able to find the command to produce empirical bayes estimates of the random effects and to put them into a SAS data set. Here is my code:

proc tmodel data=some_data_file outparms=some_output_file;
crosssection upc  ;
endogenous logPrice;
parms a -2
b0 -2
s2u .1;
instruments logpriceInst;
logUnitSales = a + (b0 + b1)*logPrice;
performance nthreads = 8;
random b1 ~ normal(0, s2u);
fit logUnitSales ;
run;
QUIT;

So far, it does create a file with the estimated fixed effects but not the random effects. Thanks in advance.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 0 replies
  • 745 views
  • 0 likes
  • 1 in conversation