[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: question RE -ml- and ancillary parameters
Phil Schumm <email@example.com> asks about using -ml- to fit a model where
the number of ancillary parameters is a function of the data:
> I am coding an estimator for a model in which the number of ancillary
> parameters depends on the observed support of the dependent variable
> -- very similar to an ordinal probit or logit model. My first step
> was to translate R code I was given which successfully estimates the
> model into Stata (mostly into Mata); now, I would like to re-
> implement the estimator using -ml- to explore the performance
> differences and to access all of the -ml- related goodness (e.g.,
> hooks for robust estimates of variance, svy capability, and
> constrained estimation).
> I have used -ml- frequently in the past, but never with a problem
> like this. Unfortunately, -_oprobit- and -_ologit- (the underlying
> commands which implement -oprobit- and -ologit-) are built-in, so I
> can't see how they handle this issue. My first instinct would be to
> construct an -ml model- statement programmatically based on the data
> and then execute it. Is this a reasonable approach, and are there
> any practical limits to the number of ancillary parameters (i.e.,
> equations) that can be specified this way?
Phil's first instinct is definitely a reasonable approach.
While -ologit- and -oprobit- put an upper limit on the number of outcomes,
-ml- does not put a limit on the number of equations. The only limit is on
the length of a command line (see -help limits-). Thus if you can type it
into a command line, Stata's -ml model- command can parse it.
The only other limiting factor I can think of for -ml- would be due to the
numerics of the model fit for a given dataset--some datasets with wide but
sparsely supported dependent variables could provide serious challenges for
* For searches and help try: