[Limdep Nlogit List] Help with Matrix command Rndm
Schmidt, Shelton
schmidts at union.edu
Tue Mar 23 04:38:15 EST 2010
Hi Bill,
Thank you very much for your help.
I get the following error messages. Is my problem that I'm using
Version 8.0.6 April 25, 2003?
--> RESET
--> RESET $
--> MATRIX ; muA = [10.0, 20.0] $
--> MATRIX ; sigmaA = [9.0, 5.0 / 5.0, 16.0] $
--> ROWS ; 1000 $
Data matrix will have 1000 rows and 200 columns.
--> SAMPLE ; 1-1000 $
--> CALC ; Ran(12345) $
--> CREATE ; A = RMN(muA,sigmaA) $
Error: 768: Have been unable to break down the command segment.
Error: 623: Check for error in RMNaa
Error: 623: Look for: Unknown names, pairs of operators, e.g., */
Error: 61: Compilation error in CREATE. See previous diagnostic.
I think I need the ROWS command, otherwise I get the error message:
--> MATRIX ; sigmaA = [9.0, 5.0 / 5.0, 16.0] $
--> SAMPLE ; 1-1000 $
Error: 38: SAMPLE - range n1-n2, n1<=0,n2<=0, n1>nrec, n2>nrec,
n1>n2.
Thanks,
Shelton
***********************
-----Original Message-----
From: limdep-bounces at limdep.itls.usyd.edu.au
[mailto:limdep-bounces at limdep.itls.usyd.edu.au] On Behalf Of William
Greene
Sent: Monday, March 22, 2010 7:47 AM
To: Limdep and Nlogit Mailing List
Subject: Re: [Limdep Nlogit List] Help with Matrix command Rndm
Shelton. Use
CREATE ; A = RMN(mua,sigmaa) $
You do not need the ROWS command.
Regards,
/Bill
----- Original Message -----
From: "Shelton Schmidt" <schmidts at union.edu>
To: limdep at limdep.itls.usyd.edu.au
Sent: Monday, March 22, 2010 1:45:00 AM GMT -05:00 Colombia
Subject: [Limdep Nlogit List] Help with Matrix command Rndm
I am trying to generate 1000 observations on each of two pseudo-random
variables, say x1 and x2. The requirements are as follows:
1. the bivariate pdf is multivariate normal;
2. the mean of x1 is 10 and the mean of x2 is 20;
3. the variance of x1 is 9 and the variance of x2 is 16; and
4. the covariance between x1 and x2 is 5.
It seems to me that I should be able generate these 2000 numbers using
the following LIMDEP commands,, but I can't. Please help.
Thanks,
Shelton
/***********************************************************************
*/
RESET $
MATRIX ; muA = [10.0, 20.0] $
MATRIX ; sigmaA = [9.0, 5.0 / 5.0, 16.0] $
ROWS ;1000$
SAMPLE ;1-1000$
CALC ; Ran(12345) $
MATRIX ; A = Rndm(muA, sigmaA) $
/***********************************************************************
*/
_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au
_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au
More information about the Limdep
mailing list