Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: how can I pass a parameter to gengammareg?

From   Matteo Richiardi <>
Subject   st: how can I pass a parameter to gengammareg?
Date   Mon, 8 Mar 2010 00:46:33 +0100

I'm trying to use the gengammareg ado file within the minbound
command, but although everything seems working (separately), the
program doesn't work.
This is what I have written:

capture program drop simulation
program simulation, rclass
       version 10
      args s
       capture drop t_sim
       gengammareg t_sim, kappa(1) sigma(`s')
       // stset the data and fit a Weibull regression model
       stset t_sim
       streg, distribution(weibull)
       scalar s_hat_sim = r(est)
       return scalar diff = s_hat_sim - .5

minbound simulation, range(.01 1) trace


And this is what I get from Stata:

failure running quadratic on x =          .01

It seems as gengammareg accepts parameters only manually. Any idea on
how I can get round of this problem? Thanks so much for support,


*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index