Tuesday, March 07, 2006

st: forvalues gives "numlist has too many elements" error

Dear all,

The code below worked fine, until I tried it with `1'==10000 (`1' refers to the number of repetitions in a simulation). When I did this, I received the following error message:

"invalid numlist has too many elements r(123);"

The help info on r(123) didn't help me -- it refers you to [U] 11.1.8 numlist, but I didn't find anything useful for my problem there.

Any thoughts? Is there a workaround this issue?

Pablo

-----------code begins-------------- foreach posed in o2 o3 o4 b2 b3 b4 {

forvalues rep = 1/`1' { if (`rep'==1) { mat MR`posed'=(mr`posed'_`rep') } else { mat MR`posed'=(MR`posed' \ mr`posed'_`rep') } } } -------------- code ends-------------------

-- Pablo A. Mitnik University of Wisconsin-Madison (http://www.wisc.edu/ ) Department of Sociology ( http://www.ssc.wisc.edu/soc/) Center on Wisconsin Strategy (http://www.cows.org/ ) 1180 Observatory Drive Room 7114A Madison, WI 53706 TEL (608) 2621839 E-mail: pmitnik@ssc.wisc.edu

* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/


Tag:


Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?