Announcement

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

  • Issues with Lincom command

    Hello,
    I posted this question a few days ago, and I am trying to use the lincom command to find the P-test, t-test, confidence interval and coefficient between two variables. This is actually for a Stata-led statistics class as I am a Ph.D. student. All the lincom examples given in the text and the variables asked in the homework all result in the same error. Below is my Do-file for an example:

    mean egalitarianism [pw=nesw], over(Female)
    lincom [egalitarianism]Male - [egalitarianism]Female


    However, with lincom I continue to get the same error command:

    equation [egalitarianism] not found
    r(303);


    Does anyone have suggestions I may use to find the same needed results without using the lincom command?

  • #2
    Matthew:
    in all likelihood, you did not receive any reply because posting and replying to class/homework queries in discouraged on this forum (see the FAQ).
    FAQ also report how to post Stata (and statistics)-related questions effectively..
    That said, with the following toy-example, I cannor replicateyour problem:
    Code:
    . use "C:\Program Files (x86)\Stata15\auto.dta"
    (1978 Automobile Data)
    
    . mean price [pw=weight ], over( foreign )
    
    Mean estimation                   Number of obs   =         74
    
         Domestic: foreign = Domestic
          Foreign: foreign = Foreign
    
    --------------------------------------------------------------
            Over |       Mean   Std. Err.     [95% Conf. Interval]
    -------------+------------------------------------------------
    price        |
        Domestic |   6500.577   503.7304      5496.644     7504.51
         Foreign |   6799.051   663.8892      5475.922    8122.181
    --------------------------------------------------------------
    
    . lincom [price]Domestic- [price]Foreign
    
     ( 1)  [price]Domestic - [price]Foreign = 0
    
    ------------------------------------------------------------------------------
            Mean |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             (1) |  -298.4742   833.3626    -0.36   0.721    -1959.363    1362.415
    ------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you for the response and clarification

      Comment

      Working...
      X