Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Missing Variable

    Hi guys, hope you are having a nice week!

    I'm having an issue with Stata (version 12). I imported my data from a .txt form. On the preview it shows me the list of variables including "GDPpercapita". however, when I run the command to import the data, the variable "GDPpercapita" disappears altogether.

    I have 4 datasets (Disputes, Control Variables, WTOmembers, and WITS data). The GDP per capita is in the Control Variables dataset. When I open that one alone, the GDP per capita variables is there. However, when I merge the 4 of them, all the variables appear except for GDPper capita.


    is there any way to fix this?

    thanks you very much!

    Leire

  • #2
    I'm afraid I don't totally understand your description of your problem.

    In your second paragraph you tell us that GDPpercapita disappears after you run the command to import the data.

    In your third paragraph you tell us after opening the dataset in which GDPpercapita is foundm the variable is there - that it, it has not disappeared as you suggest it does in the second paragraph. Instead you now tell us it disappears after you merge four datasets.

    We can better help you if we know what commands you have tried and what Stata told you to indicate that there was a problem. Please review the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post. See especially sections 9-12 on how to best pose your question.

    It would be helpful for you to copy the import commands that read each of the four datasets, and the merges commands that merge them, along with output of each, from your Stata Results window and paste them into your Statalist post using code delimiters [CODE] and [/CODE], and to use the dataex command to provide sample data, as described in section 12 of the FAQ.

    Comment


    • #3
      Thank you William fro you reply. I already figured it out, but I will consider what you said for the next time I write here. Sorry for the inconveniences and thank you very much!

      Comment

      Working...
      X