I am a Stata user but can't answer your question because I have no idea what you are trying to duplicate.
In addition, I recommend putting the question on Statalist (statalist.org); but first read the FAQ which has lots of advice on how to post good (i.e., answerable) questions
Rich
------------------------------
Richard Goldstein
------------------------------