Bookmark and Share

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


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

Re: st: simulate error


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: simulate error
Date   Tue, 11 Mar 2014 14:41:53 +0000

return scalar sd   = r(sd

is a typo of some kind. You need to close the parentheses.
Nick
[email protected]


On 11 March 2014 14:04, Mark Baerthel <[email protected]> wrote:
> clear all
>
> program define mark, rclass
>
> use ".\dta\full.dta"
> keep if loan_status =="Fully Paid" | loan_status =="Charged Off"
> keep if year == 2010
> keep if term ==" 36 months"
>
> sample 5 if grade=="A" , count
> sample 5 if grade=="B" , count
> sample 5 if grade=="C" , count
> sample 5 if grade=="D" , count
> sample 5 if grade=="E" , count
> sample 5 if grade=="F" , count
> sample 5 if grade=="G" , count
>
> summarize ahpr_matured
> return scalar mean = r(mean)
> return scalar sd   = r(sd
> end
>
> simulate pipi=r(mean) pipi2=r(sd), reps(10): mark
>
> ALWAYS GET THIS ERROR !!
>
> . simulate pipi=r(mean) pipi2=r(sd), reps(10): mark
> nothing found where name expected
> an error occurred when simulate executed mark
> r(198);
>
>
> why ??
>
> thank you so much.
> *
> *   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/
*
*   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/


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