Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: rndpoi & r(162)


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: rndpoi & r(162)
Date   Thu, 14 Aug 2003 09:27:10 +0100

Benoit Dulong
> 
> SUPPOSE THAT I WANT TO GENERATE
> 100 NUMBERS FROM A POISSON WITH PARAMETER LAMBDA=25.
> I USE THE SYNTAX:
> 
> . clear
> . rndpoi 100 25
> 
> AND I GET THE MESSAGE:
> 
> rndpoi: ado-file does not define command
> r(162);
> 
> ------------------------------------------------------------
> ----------
> 
> I USE THE SYNTAX:
> 
> . search rc 162
> 
> AND GET THE MESSAGE:
> 
> [P]     
> error  . . . . . . . . . . . . . Return code 162
> ado-file does not define command;
> The first program in any ado-file must be named the same as
> the ado-file name.  For example, xyz.ado must begin with
> program define xyz.  The command you typed has loaded an
> ado-file that violates this rule.
> 
> ------------------------------------------------------------
> ----------
> 
> I COPY AND PASTE THE BEGINNING OF THE FILE rndpoi.ado
> AND GET:
> 
> *!version 1.1 1993 Joseph Hilbe, Walter Linde-Zwirble   
> (sg44: STB-28)
> * revised 10Mar97 Hilbe with assistance from Guy van Mille  
> STB-41 sg44.1
> * Poisson distribution random number generator
> * Example: rndpoi 1000 4  [set obs 1000;  4 is the mean]
> 
> program define rndpoi1
>    version 3.1
> 
> IT SEEMS THAT THE FILE rndpoi.ado CONTAINS A
> PROGRAM (ADO FILE) CALLED rndpoi1.ado (SHOULD BE rndpoi.ado ?).
>  
> ------------------------------------------------------------
> ----------
> 
> I WANT TO CHECK IF MY PACKAGE IS UP-TO-DATE,
> SO I USE THE SYNTAX:
> 
> net install sg44_1.pkg
> 
> AND I GET THE MESSAGE:
> 
> package installation
> 
> package name:  sg44_1.pkg
>         from:  http://www.stata.com/stb/stb41/
> 
> checking sg44_1 consistency and verifying not already installed...
> all files already exist and are up-to-date.
> 
> ------------------------------------------------------------
> ----------
> 
> THIS PROGRAM WAS CREATED IN 1993.
> PROBLEMS, IF ANY, WERE REPORTED AND CORRECTED.
> FOR EXAMPLE, rndbin WORKS FINE.
> SO, I DO NOT UNDERSTAND WHAT IS HAPENING TODAY.

This is just a typo, I think (just as in my 
last email replying to Benoit, I wrote pecheur when I meant
pecheur...) 

In the sg44_1 version, the reference to "rndpoi1" 
should indeed be "rndpoi". 

Try the version at http://www.stata.com/users/jhilbe

. net from http://www.stata.com/users/jhilbe

Nick 
[email protected] 
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index