[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: Generating a matrix
The only thing that looks like it might cause a syntax problem is the
closing brace of the forvalues loop being on the same line as the matrix
command. Try putting it on it's own line and see if that helps...
----- Original Message -----
Sent: Saturday, April 03, 2004 2:50 PM
Subject: st: Generating a matrix
I have a small problem with a macro which - as I have to admit ( is it a
macro ?), has been written by a colleague a year ago ( who probably now
enjoys his weekend so I cannot ask him). These lines have worked with a
Stata version prior than 8.2, and as I do them now again with Stata 8.2,
Stata returns an error message "invalid syntax". I tried by reading the
helpfiles on matrix operations to find out what went wrong, but ,
unfortunately, up to now I have no clue.
These are the few lines:
inequal7 S_BEHH88 if KANTON==`i'
inequal7 S_NEHH88 if KANTON==`i'
inequal7 S_NEHHBu88 if KANTON==`i'
inequal7 S_NEHHKom88 if KANTON==`i'
inequal7 S_NEHHKa88 if KANTON==`i'
inequal7 S_NEHHSubfed88 if KANTON==`i'
The idea is to calculate gini-coefficients of 26 Swiss cantons (using
inequal7, written for Stata7 ) and to put them into a matrix, with each
column reserved for one particular income inequality. There should be then
26 rows, one for each canton. Running this program shows that Stata does
calculate some inequality measures , but then stops. KANTON takes on the
values between 1 and 26.
Any help would be very much appreciated.
* For searches and help try: