Announcement

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

  • how to create a new aggregate variable?

    Hello,
    I have a few variables in my dataset. I am trying to make an aggregate variable from the variables in the dataset. I am trying to make an aggregate variable for different commodities into a single total trade value variable. I only just want total trade value from the year variable for each country, in my case Bangladesh and Myanmar. Every code I run gives some sort of bizarre result. I am attaching a snippet of my data.
    Any help would be greatly appreciated.
    Regards,
    Md. Azmeer Rahman Sorder
    Attached Files

  • #2
    Code:
    bysort country year: egen wanted = total(tradevalueus)
    Note: Please see the FAQ, especially sections 12.4 and 12.5, on why not to post screenshots of data. Link here: Help - Statalist

    Comment


    • #3
      Hey mate use dataex to copy and paste your data. Someone will be able to help you

      Comment


      • #4
        Thank you so much for your help!!!

        Comment

        Working...
        X