Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: how can I pass a parameter to gengammareg?


From   Matteo Richiardi <[email protected]>
To   [email protected]
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
end

// MINIMIZATION
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,

Matteo

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index