This may be a Stata version problem as there was a time when string variables were constrained to be 80 or fewer characters long. Using Stata 9.2, I was able to do the following:
. de
Contains data
obs: 10
vars: 1
size: 1,040 (99.9% of memory free)
-------------------------------------------------------------------------------
storage display value
variable name type format label variable label
-------------------------------------------------------------------------------
name str100 %100s
-------------------------------------------------------------------------------
Sorted by:
Note: dataset has changed since last saved
. recast str120 name
. de
Contains data
obs: 10
vars: 1
size: 1,240 (99.9% of memory free)
-------------------------------------------------------------------------------
storage display value
variable name type format label variable label
-------------------------------------------------------------------------------
name str120 %120s
-------------------------------------------------------------------------------
Sorted by:
Note: dataset has changed since last saved
>I have another simple question. I've checked all that
>STATA manuals, and have read up on recast, but I am
>still having problems. When I imported my data, STATA
>defaulted a string variable to str80 - so it cut off
>some of my responses. I wanted to change the storage
>type to str200. I've used this command:
>
>. recast str100 q5mtype
>
>q5mtype: str100 invalid
>r(109);
>
>
>While Stata will allow me to decrease the size (i.e. I
>could type: . recast str79 q5mtype, and it will accept
>me, but it will not allow me to increase the str size.
> Any ideas?
>
>Thanks,
>Buddy
--
===================================================
Eric G. Wruck
Econalytics
2535 Sherwood Road
Columbus, OH 43209
ph: 614.231.5034
cell: 614.330.8846
eFax: 614.573.6639
eMail: [email protected]
website: http://www.econalytics.com
====================================================
*
* 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/