Statalist


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

st: RE:


From   Adrian de la Garza <[email protected]>
To   <[email protected]>
Subject   st: RE:
Date   Thu, 5 Jun 2008 12:49:26 -0400

Hi Cinzia,

The problem is that nato is a string, so continents is a string too. You could fix this by either destringing nato before you generate continents or by typing something like

replace continents = "1" if nato == "42"

hope this helps.
Adrian


> Date: Thu, 5 Jun 2008 17:12:39 +0100
> From: [email protected]
> To: [email protected]
> Subject:
>
> Dear Statlisters,
>
> i wonder if you could help to solve this:
>
> I am generating a new variable but STATA does not allow me to do that i
> think becasue of the format of the variable "nato":
>
> g continents= nato
> replace continents=1 if nato==42
> type mismatch
>
>
> format nato if year==1994
>
> variable name display format
> -----------------------------
> nato %9s
> -----------------------------
>
> while i suspect the format should be %8g? Correct?
>
> I would appreciate any suggestions/help.
>
> Best
>
> Cinzia
> *
> * 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/

_________________________________________________________________
Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends
*
*   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