Announcement

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

  • Weights not working

    Hi everyone,

    I've been trying to run a regression analysis with weights, but Stata keeps telling me:

    fweigths unknown weight type
    r(198);

    My code:
    regress dv iv [fweights=Weight]

    Yet, I cannot find out how to fix this. Your help would be most welcome!

  • #2
    Lisa:
    an -s- in excess caused the mess! (pun intended)
    Code:
    . use "C:\Program Files\Stata17\ado\base\a\auto.dta"
    (1978 automobile data)
    
    . regress price trunk weight [fweights= foreign ]
    fweights unknown weight type
    r(198);
    
    . regress price trunk weight [fweight= foreign]
    
          Source |       SS           df       MS      Number of obs   =        22
    -------------+----------------------------------   F(2, 19)        =     38.14
           Model |   115574797         2  57787398.3   Prob > F        =    0.0000
        Residual |  28788416.1        19  1515179.79   R-squared       =    0.8006
    -------------+----------------------------------   Adj R-squared   =    0.7796
           Total |   144363213        21   6874438.7   Root MSE        =    1230.9
    
    ------------------------------------------------------------------------------
           price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
           trunk |   107.3309   85.80616     1.25   0.226    -72.26347    286.9252
          weight |   5.178396   .6374784     8.12   0.000     3.844138    6.512654
           _cons |   -6832.56   1594.089    -4.29   0.000    -10169.03   -3496.094
    ------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X