Home Forums ASGEN : Program for the Weighted Average Mean in Stata Equal and weighted mean with asgen in Stata

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Dan
    Guest
    Post count: 118

    Dear Prof. Shah,
    I am using your asgen command and find it very helpful, thanks!
    Am I correct with the default option not choosing a variable for the weighted mean, I´ll automatically create an equally weighted mean?

    *Example: This creates a mean based on MV_EU1?
    bysort Date: asgen MW_return_EU1 = Return if Ranking_EU==1, w(MV_EU1)
     
    *Example 2: Creates an equally weighted based on the Return?
    bysort Date: asgen EW_return_EU1 = Return if Ranking_EU==1 

    Thanks in advance.

    Regards,
    Dan

    Attaullah Shah
    Keymaster
    Post count: 69

    Dan
    Yes, you are right in both the statements.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.