Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Feddag Mohand-Larbi <Mohand-Larbi.Feddag@univ-nantes.fr> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: How to maximize an approximated likelihood |

Date |
Thu, 04 Apr 2013 15:24:56 +0200 |

Dear Statausers, I am wondering to know how to maximize an approximated likelihood depending on three parameters: the difficulty parameter as matrix, the mean of the latent traits and its variance. The function wrotten in Stata where the approximation is obtained by Gauss-Hermite quadrature is given as follows: qui gen proba=. qui gen x=. forvalues i=1/`nbobs' { local int2=1 local u=RaschDepLoc[`i',1] local v=`diff'[1,1] local int1 "exp(`u'*(x-`v'))/(1+exp(x-`v'))" forvalues j=2/`nbitems' { local t=`diff'[`j',1] local r=RaschDepLoc[`i',`=`j-1''] local s=RaschDepLoc[`i',`j'] local int2 "`int2'*exp(`s'*(x-`t'+`d'*`r'))/(1+exp(x-`t'+`d'*`r'))" } local int="`int1'*`int2'" qui gausshermite `int', mu(`mu') sigma(`sigma') display qui replace proba=r(int) in `i' } gen lik=log(proba)*`nbobs' where nbobs is the number of individuals, nbitems is the number of items, RaschDepLoc is the matrix of data of order (nbobs*nbitems), diff is the vector of difficulties parameters, mu and sigma^2 are the mean and the variance of the latent traits. I don't know how to write this function in order to use ml model lf myfunction (? =?) and ml maximize best Dr Feddag * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**re: Re: st: where's the code for -total- ?** - Next by Date:
**re: Re: Re: st: replicating 2 X 2 data from a paper** - Previous by thread:
**st: Mata - extracting various vectors of different sizes in one loop** - Next by thread:
**st: How to maximize an approximated likelihood** - Index(es):