Dear All,
I am still trying to perform my maximum likelihood. The point is that I receive this error message:"could not calculate numerical derivatives discontinuous region with missing values encountered". I don't have any value that is equal to zero in my data. So maybe this is a problem of inconsistency,there could be some values that go to zero or infinity. At this point I would like to simulate my maximum likelihood in order to have initial feasible values. Following my program for the maximum likelihood: program define myprogr version 10.0 args lnf a d b mo mq eo eq n g tempvar ma md mb mmo mmq meo meq mn mg quietly gen double `ma'=1-`a' quietly gen double `md'=1-`d' quietly gen double `mb'=1-`b' quietly gen double `mmo'=1-`mo' quietly gen double `mmq'=1-`mq' quietly gen double `meo'=1-`eo' quietly gen double `meq'=1-`eq' quietly gen double `mn'=1-`n' quietly gen double `mg'=1-`g' quietly replace `lnf'=ln((`a')*(`d')*((((`b')*(`mq')*(`g')+(`b')*(`mmq')*(`eq')*(`n'))^bq)*(((`mb')*(`mo')*(`g')+(`mb')*(`mmo')*(`eo')*(`n'))^bo)*(((`b')*(`mmq')*(`eq')*(`mn'))^sq)*(((`mb')*(`mmo')*(`eo')*(`mn'))^so)*(((`b')*(`mmq')*(`meq')+(`mb')*(`mmo')*(`meo'))^nt))+(`a')*(`md')*((((`b')*(`mmq')*(`eq')*(`n'))^bq)*(((`mb')*(`mmo')*(`eo')*(`n'))^bo)*(((`b')*(`mq')*(`mg')+(`b')*(`mmq')*(`eq')*(`mn'))^sq)*(((`mb')*(`mo')*(`mg')+(`mb')*(`mmo')*(`eo')*(`mn'))^so)*(((`b')*(`mmq')*(`meq')+(`mb')*(`mmo')*(`meo'))^nt))+(`ma')*((((`b')*(`eq')*(`n'))^bq)*(((`mb')*(`eo')*(`n'))^bo)*(((`b')*(`eq')*(`mn'))^sq)*(((`mb')*(`eo')*(`mn'))^so)*(((`b')*(`meq')+(`mb')*(`meo'))^nt))+2.71^(-745)) end ml model lf myprogr (a:) (d:) (b:)(mo:)(mq:)(eo:)(eq:)(n:)(g:) ml search ml maximize, difficult I would like to have simulated values for a,d,b,mo,mq,eo,eq,n,g After end would should I write? simulate.... Could you please help me? I am encountering many difficulties that i don't know how to overcome. Thanks a lot Katia * * 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/ |
Hi Statalist,
I'm joining the list again after a period of absence. For some reason, I don't seem to be able to send directly to [hidden email], but if I reply to a post, then it seems to get there. My original message was as follows: Hi Statalist, Is there any reason why Stata won't let you draw a graph whose y-axis' range is less than the actual range of the data? Is there a way to get round this? The motivation comes from doing a graph where there is one group which has a articularly large y value. If I graph it with the other groups, then all the other groups will be very small, and their relative heights not very distinguishable. If I can focus on the other groups and let the outlying group 'goes off the scale', that's clearly quite a good device to have. In fact, the problem can't be overcome even if I artificially set the outlying y value to the maximum of the y range, because the top will look different, particularly when I want to graph error intervals. Thanks for your help. Tim * * 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/ |
Line for the server... Try http://www.stata-journal.com/sjpdf.html?articlenum=gr0019 HTH Martin -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Mak, Timothy Sent: Friday, December 05, 2008 4:15 PM To: [hidden email] Subject: st: graphing problem Hi Statalist, I'm joining the list again after a period of absence. For some reason, I don't seem to be able to send directly to [hidden email], but if I reply to a post, then it seems to get there. My original message was as follows: Hi Statalist, Is there any reason why Stata won't let you draw a graph whose y-axis' range is less than the actual range of the data? Is there a way to get round this? The motivation comes from doing a graph where there is one group which has a articularly large y value. If I graph it with the other groups, then all the other groups will be very small, and their relative heights not very distinguishable. If I can focus on the other groups and let the outlying group 'goes off the scale', that's clearly quite a good device to have. In fact, the problem can't be overcome even if I artificially set the outlying y value to the maximum of the y range, because the top will look different, particularly when I want to graph error intervals. Thanks for your help. Tim * * 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/ * * 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/ |
Hi Martin,
Thanks for the article. However, as the article says, Stata determines the minimum range of the graph according to the range of the data. It remains impossible to set the range of the graph to be smaller than that of the data. Tim -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Martin Weiss Sent: 05 December 2008 15:17 To: [hidden email] Subject: st: RE: graphing problem Line for the server... Try http://www.stata-journal.com/sjpdf.html?articlenum=gr0019 HTH Martin -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Mak, Timothy Sent: Friday, December 05, 2008 4:15 PM To: [hidden email] Subject: st: graphing problem Hi Statalist, I'm joining the list again after a period of absence. For some reason, I don't seem to be able to send directly to [hidden email], but if I reply to a post, then it seems to get there. My original message was as follows: Hi Statalist, Is there any reason why Stata won't let you draw a graph whose y-axis' range is less than the actual range of the data? Is there a way to get round this? The motivation comes from doing a graph where there is one group which has a articularly large y value. If I graph it with the other groups, then all the other groups will be very small, and their relative heights not very distinguishable. If I can focus on the other groups and let the outlying group 'goes off the scale', that's clearly quite a good device to have. In fact, the problem can't be overcome even if I artificially set the outlying y value to the maximum of the y range, because the top will look different, particularly when I want to graph error intervals. Thanks for your help. Tim * * 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/ * * 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/ * * 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/ |
Perhaps the "FAQ: How can I show scale breaks on graphs? "
http://www.stata.com/support/faqs/graphics/scbreak.html would be helpful. Scott On Fri, Dec 5, 2008 at 10:18 AM, Mak, Timothy <[hidden email]> wrote: > Hi Martin, > > Thanks for the article. However, as the article says, Stata determines > the minimum range of the graph according to the range of the data. It > remains impossible to set the range of the graph to be smaller than that > of the data. > > Tim * * 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/ |
In reply to this post by Mak, Timothy
Stata here as elsewhere applies the principle that a graph should be
honest about your data. Equivalently, it does not want to make it easy for you to omit data from a graph by accident. Thus if you want to omit data on purpose you should do on purpose by applying -if-. An alternative might be to use a log scale. Nick [hidden email] Mak, Timothy Thanks for the article. However, as the article says, Stata determines the minimum range of the graph according to the range of the data. It remains impossible to set the range of the graph to be smaller than that of the data. Martin Weiss Try http://www.stata-journal.com/sjpdf.html?articlenum=gr0019 Mak, Timothy Is there any reason why Stata won't let you draw a graph whose y-axis' range is less than the actual range of the data? Is there a way to get round this? The motivation comes from doing a graph where there is one group which has a articularly large y value. If I graph it with the other groups, then all the other groups will be very small, and their relative heights not very distinguishable. If I can focus on the other groups and let the outlying group 'goes off the scale', that's clearly quite a good device to have. In fact, the problem can't be overcome even if I artificially set the outlying y value to the maximum of the y range, because the top will look different, particularly when I want to graph error intervals. * * 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/ |
Free forum by Nabble | Edit this page |