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

  • finding the error squared term

    okay hello, i am in need of help trying to learn how to use stata for econometrics! I do not know how to generate or find the u^2 or the (uhat)^2
    i am trying to find the var of error (sleep) dependent only on gender
    So i did predict yhat and want to regress uhat^2 dependent on male
    this is the example our professor used to explain for stata

    "1. Estimate the model of interest

    realearnings= 𝛽 +𝛽𝑎𝑔𝑒+𝛽𝑎𝑔𝑒2+𝛽𝑒𝑑𝑢𝑐𝑎𝑡𝑖𝑜𝑛+𝛽h𝑜𝑢𝑟𝑠𝑤𝑜𝑟𝑘𝑒𝑑+𝑢
    1. Calculate ln(𝑢̂2)
    2. Estimate the secondary regression

    ln(𝑢̂2) = 𝛿0 + 𝛿1𝑎𝑔𝑒 + 𝛿2𝑎𝑔𝑒2 + 𝛿3𝑒𝑑𝑢𝑐𝑎𝑡𝑖𝑜𝑛 + 𝛿4h𝑜𝑢𝑟𝑠 𝑤𝑜𝑟𝑘𝑒𝑑 + 𝑣""
    But i dont know how to calcluate u!!!

    HELP P

  • #2
    𝑢̂ is the residual.

    See the discussion of using the predict command after a regress command in the output of help regress postestimation.
    Last edited by William Lisowski; 19 Apr 2021, 19:38.