Bookmark and Share

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

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

Re: st: re: Cumulative Accuracy Profile

From   "Joseph Coveney" <>
To   <>
Subject   Re: st: re: Cumulative Accuracy Profile
Date   Fri, 4 Feb 2011 12:22:26 +0900

Mika wrote:

. . . I really have no idea how to program in Stata but ill give it a try 


Take a look at the line of code just beneath the "Begin here" comment in the 
illustration below to get an idea of what to do.  (The beginning of the 
illustration code just creates an artificial dataset to work with.  I don't 
work in credit risk assessment, and so have no idea whether the fake data values
and parameter choice are realistic or not.)

You can refer to the help file for -nl- for further details on the syntax for 
the nonlinear least-squares regression estimation command, as Nick pointed out.

Joseph Coveney

version 11.1

clear *
set more off
set seed `=date("2011-03-03", "YMD")'

set obs 250
generate double x = 100 * runiform()
scalar define k = 0.5
generate double y = (1 - exp(-k * x)) / (1 - exp(-k)) + rnormal()

* Begin here
nl(y = (1 - exp(-{k} * x)) / (1 - exp(-{k}))), init(k 1) nolog


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index