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, **statalist.org** is already up and running.

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

From |
SLG Brilleman <sam.brilleman@bristol.ac.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: How to retrieve parameter estimates from an ML program, so they can be used in estimation of expected values, variances, etc... |

Date |
Mon, 29 Mar 2010 12:54:31 +0100 |

Hi

/* Full log-likelihood */ program ggm, eclass version 10 args todo b lnf /* Define parameters of GGM */ tempvar mu sigma kappa mleval `mu' = `b', eq(1) mleval `sigma' = `b', eq(2) mleval `kappa' = `b', eq(3) /* Temporary variables to be used in likelihood */ tempvar n sumlny A B quietly gen double `n' = _N quietly egen double `sumlny' = total(ln($ML_y1)) quietly gen double `A' = abs(`kappa')^(-2)

/* Log-likelihood */

((sign(`kappa')*(sqrt(`A'))/(`sigma'))*(`sumlny'-`n'*`mu'))-(`A'*`B') /* Some of the attempts at extracting sigma */ scalar __sigma =_b[`sigma':_cons] gen __sigma =_b[`sigma':_cons] ereturn scalar sigma = _b[sigma:_cons] end Thanks, Sam. * * 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/

**Follow-Ups**:**Re: st: How to retrieve parameter estimates from an ML program, so they can be used in estimation of expected values, variances, etc...***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**st: RE: How to retrieve parameter estimates from an ML program, so they can be used in estimation of expected values, variances, etc...***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**RE: st: list x matrix** - Next by Date:
**RE: st: FW: [...] Stored Data after the calculation** - Previous by thread:
**st: Interval constraints Poisson regression** - Next by thread:
**st: RE: How to retrieve parameter estimates from an ML program, so they can be used in estimation of expected values, variances, etc...** - Index(es):