Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# Re: st: re: Cumulative Accuracy Profile

 From Nick Cox To statalist@hsphsun2.harvard.edu Subject Re: st: re: Cumulative Accuracy Profile Date Thu, 3 Feb 2011 09:32:47 +0000

```That's nonlinear least squares.

On Thu, Feb 3, 2011 at 9:18 AM, Nick Cox <njcoxstata@gmail.com> wrote:
> The name for the common fruit fly is Drosophila [not ...philia]
> melanogaster. Genus names are capitalised, specific names are not.
>
> In terms of the question, if you are minimising RMSE you are also
> minimising its square. In other words, this problem is nonlinear
> linear squares and there is absolutely no need to program it yourself.
> Head straight for the help and the manual entry for -nl-.
>
> Nick
>
> On Thu, Feb 3, 2011 at 5:52 AM, Drosophilia Melanogaster
>
>> How does one program an algorithm that estimates the concavity of a Cumulative Accuracy Profile (CAP) curve? I wish to fit a model for y using the function:
>>
>> y = [1- exp(-kx)]/[1-exp(-k)]
>>
>> where k is my parameter of interest and is obtained by minimizing a root mean square  error (RMSE) of the form:
>>
>>
>> e = sqrt{(1/N)*summation i to n of [y_i - [1- exp(-kx_i)]/[1-exp(-k)]]^2}.
>>
>>
>> The RMSE is minimized by applying a Newton-Raphson procedure using the following iteration (i=1,2... 20):
>>
>>
>> k_i+1 = k_i - [(de/dk)/(d2e/dk2)]     (ratio of derivatives)
>>
>>
>

*
*   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/
```