Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: stata 8 - strings

From   "PM McKee" <[email protected]>
To   [email protected]
Subject   st: stata 8 - strings
Date   Wed, 12 Apr 2006 10:10:17 +0100

I am programming a simultaneous equation model and are generating the reduced form equations by constructing the union of different sets of variables.
Since there is a large number of variables involved we are exceeding the stata limit on string lengths of 244.
I have got round the problem by renaming variables using shorter names but we wonder is there a more satisfactory alternative?

Below is the code we have used.

* creating the set of Reduced Form variables for each structural equation Xu1 etc
forvalues ir = 1/`nofrowsinA'{
local notset = 0
forvalues ic = 1/`nofcolsinA' {
if structeqt[`ir',`ic']==1 & `notset' == 0{
* joining sets of variables - first lot
* eqtvar`ic' is the list of exogenous variables in struct eqt ic
local Xu " `eqtvar`ic'' "
local notset = 1
else if structeqt[`ir',`ic']==1 & `notset' == 1{
* for each variable in the next lot -
* if it appears in the first lot blank it out
foreach x in `eqtvar`ic'' {
local XX = subinword("`Xu'","`x'","",1)
local Xu `XX'
local XX " `Xu' `eqtvar`ic'' "
local Xu " `XX'"
local Xu`ir' "`Xu'"
sum `Xu`ir''

Many thanks for any assistance

Patricia McKee
Senior Computing Officer
Room 3A17
School of Economics and Politics
University of Ulster at Jordanstown
Newtownabbey   BT37 0QB

phone (028) 9036 6353

*   For searches and help try:

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