I want to make a random draw from ba gamma distribution in a panel workfile with 1,2,….N firms and 1,2,… T time periods. I want to draw from the gamma distribution for every firm (n), holding time fixed (t=1,2,...T). I would like to make a total of S (s=1,2,….S) draws or simulations:
I have made the following code
Code: Select all
wfcreate(wf=panel, page=panel) a 2000 2100 100
for !s=1 to 10
genr sigmad_{!s} = @rgamma(0.5,1) 'this is not done holding time fixed...?
next
However, this does not draw from the gamma distribution for every firm, holding time fixed. How can I draw sigmas from a gamma distribution holding time fixed in a panel workfile?
Thomas