Announcement

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

  • WLS regression using regwls and regress

    Dear All,

    I have a question regarding WLS regression using Stata commands regwls and regress and would kindly ask for your help.
    For your information, The general idea is I want to use WLS regression with the monthly number of firms for each observation as weights (I created the weight column on excel and imported into Stata since I do not know how to generate it on Stata). Additionally, the "avg" variable is the equal-weighted monthly returns on each portfolio this is my dependent variable.
    Firstly, I used the command "regwls avg MktRF SMB HML [aw=1/ Weight]" for the WLS regression with the analytical weight (However this command does not work on my Stata 13 version). Lately, I tried the command "regress avg MktRF SMB HML [aw=1/ Weight]" and it worked.

    Could someone please let me know if the two commands are the same and whether my approach is correct?
    Many thanks for your help!

    Best regards,
    Chi
    Attached Files

  • #2
    Hi Le,
    I was curious about the command you describe. -regwls- is not an official Stata command, but a userwritten one. I wonder how you came by that obscure command.
    If this comes from a supervisor or instructor, it would be better to ask why that command is needed, and understand what it does.
    I dont see any information about the "details" behind the command on the helpfile, nor references to a paper, so i cannot say what exactly regwls do.
    That being said. The command you describe does the standard wls. You should look into the formulas and methods -help regress-, which shows you exactly what Stata does when you add weights.
    HTH
    Fernando






    Comment


    • #3
      Hi Fernando,
      Many thanks for your answer. I had already looked into the formulas and methods- help regress and understand the command.
      Regards,
      Chi

      Comment

      Working...
      X