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: What is the current maximum number of "symbols" a Mata function can take?
From
<[email protected]>
To
<[email protected]>
Subject
st: What is the current maximum number of "symbols" a Mata function can take?
Date
Fri, 16 Mar 2012 15:35:16 -0400
Hello,
Wow, optimizing with Mata is much faster and allows to have bigger Hessian matrix coded in (see post below for
initial problem).
This being said, what is the current maximum number of "symbols" a Mata function can take?
With a 9 X 9 Hessian in simulated maximum likelihood I am hovering at around 150 and I will now implement my model
for couples so I will have a bigger Hessian due to interaction effect.
Regards,
Jean-François Bertrand
----------------
(Previous problem solved)
Hello all,
This is my second post on this issue, maybe my first one was unclear.
I am modelling a non-linear discrete labour supply model with the ml command. My approach is
similar to Daniele Pacifico's 2009 paper A Behavioural microsimulation model with discrete
labour supply for Italian couples, although I only look at singles for now.
I started with a simple version of the model and I added I complexity with time to ensure
everything works fine (I always use ml check, d1debug, and d2debug).
With a quadratic utility function and taking into account fixed-cost of working, I estimate
7 equations and I have a 7 by 7 Hessian. Everything run smoothly at that point.
When I introduce unobserved heterogeneity in my model, as done by Hann and Uhlendorff
(Stata Journal 2006), and use a simulated ml approach, both my d0 and d1 method works but d2 stop working.
At that point, I have a 8 by 8 Hessian.
Ml check provides this output:
. ml check
Test 1: Calling LS_singles_quad_fx2_het_d2 to check if it computes log likelihood and
does not alter coefficient vector...
Passed.
Test 2: Calling LS_singles_quad_fx2_het_d2 again to check if the same log likelihood value
is returned...
Passed.
Test 3: Calling LS_singles_quad_fx2_het_d2 to check if 1st derivatives are computed...
Passed.
Test 4: Calling LS_singles_quad_fx2_het_d2 again to check if the same 1st derivatives are
returned...
Passed.
Test 5: Calling LS_singles_quad_fx2_het_d2 to check if 2nd derivatives are computed...
FAILED; LS_singles_quad_fx2_het_d2 returned error 130.
(...)
I've tried simplifying my formulas, but because of non-linearity this is a real challenge and it provided to be an unsuccessful attempt.
As d2 is typically much faster an reliable, I'd like to know is there is a way to get around this issue? Is an 8 by 8 Hessian the biggest Hessian STATA can take?
Would MATA allow me to get over this issue?
Regards,
Jean-François Bertrand
*
* 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/