Pular para o conteúdo

Tarefa paper_repro.stock_watson_2007.eq12_16.agent

paper_reproagentT2publicépoca 1, tentativa 1Execução: 20261015T165744Z-suite-paper_repro-scripted-def9df

Veredito

passouPassou em todas as verificações obrigatórias.

Família do método (das chamadas de ferramentas): iv (two-stage least squares)

Pergunta feita ao analista

Stock and Watson, Introduction to Econometrics (2nd edition), Chapter 12, equation (12.16): using the 1995 cross-section of the 48 continental U.S. states, estimate by two-stage least squares the price elasticity of cigarette demand, the effect of the log of the real price per pack (taxes included) on the log of packs per capita, with the log of real per capita income as an included exogenous regressor, using as instruments the real general sales tax per pack and the real cigarette-specific tax per pack (two instruments). Use heteroskedasticity-robust standard errors. Report the coefficient on the log real price.

Resposta

Estimativa (infer.iv_2sls): coef.lrprice = -1,277.

Valores esperados e de onde vêm

stock_watson_2007.eq12_16.software

Fonte
linearmodels 7.0: the reference specification of stock_watson_2007 eq12_16 (infer.iv_2sls, figure 'coef.lrprice') on an independent code path
Tipo
software
Localização
stock_watson_2007: Stock and Watson (2007), Chapter 12, cigarette demand, 1995 cross-section, TSLS with the real general sales tax per pack and the real cigarette-specific tax per pack (two instruments) (equation (12.16) as the AER package's CigarettesSW examples number it), coefficient on ln(P cigarettes)
Valor
-1,27742-1.2774241334268481 (se 0,249610.24961000039848988)
Conferido por
execução de software · IV2SLS(dependent=lpacks, exog=[const, lrincome], endog=['lrprice'], instruments=['salestax', 'cigtax']).fit(cov_type='robust', debiased=True) on cigarettes (the file pinned at sha256 629e887a8104d483d450a9bbe487cb5613e62d116c4ecc84d6c8893b7393fcd2, after its 9 declared transforms, rows where year == 1995); n_obs = 48. The tool infer.iv_2sls (magi_infer, numpy) does not call linearmodels. Written by scripts/paper_repro_reference.py.
Implementação
independente da ferramenta
Endereço
https://pypi.org/project/linearmodels/7.0/
  • #8 figura da resposta próxima: -1,27742-1.2774241334268481 · relativa 0.000001 · absoluta 2.4961000039848985e-7
  • #9 figura da resposta próxima: 0,249610.24961000039848988 · relativa 0.000001 · absoluta 2.4961000039848985e-7

stock_watson_2007.eq12_16.paper

Fonte
Stock, J. H. and Watson, M. W. (2007). Introduction to Econometrics, 2nd edition. Boston: Pearson Addison Wesley. Chapter 12, the demand for cigarettes.
Tipo
textbook
Localização
Stock and Watson (2007), Chapter 12, cigarette demand, 1995 cross-section, TSLS with the real general sales tax per pack and the real cigarette-specific tax per pack (two instruments) (equation (12.16) as the AER package's CigarettesSW examples number it), coefficient on ln(P cigarettes)
Página
slide 12-10
Trecho
TSLS estimates, Z = sales tax, cig-only tax (m = 2): −1.28 ln(P) (0.25)
Valor como publicado
−1.28
Erro-padrão como publicado
0.25
Valor
-1,28-1.28 (se 0,250.25) price elasticity (log points of packs per log point of real price)
Conferido por
fonte secundária · Read on 2026-10-15 from 'Econ 422 Lecture Notes, IV Regression 2' (University of Maryland; the notes say they are slightly modified versions of lecture notes provided by Stock and Watson, 2007), slide 12-10 (PDF page 10), from the rendered page; the slides before it print the Stata runs behind the equations ('ivreg ... if year==1995, r'). The book itself was not read; the AER package's CigarettesSW examples number these models (12.15) and (12.16). The slide prints 9.89 – 1.28 ln(P) + 0.28 ln(Income) with (0.96) (0.25) (0.25); the excerpt writes its en dash as a minus sign.
sha256 da cópia lida
440deb62d0973f49baceb1694c3e87372f8941d8de210126310ed67f7aeedf44 (identifica a cópia lida, não um arquivo canônico)
Endereço
https://econweb.umd.edu/~chao/Teaching/Econ422/IV%20Regression%202.pdf
Licença
Copyright Pearson; cited, not reproduced.
  • #10 figura da resposta próxima: -1,28-1.28 · published_cell d=2 · absoluta 0.00500000128
  • #11 figura da resposta próxima: 0,250.25 · published_cell d=2 (the SE as printed) · absoluta 0.0050000010000000004

Verificações

Cada verificação, o que esperava, o que observou e a chamada que leu
#VerificaçãoObrigatóriaResultadoEsperadoObservadoTolerânciaFonteChamada
0resposta com lastro
every number backed
obrigatóriapassou—[]———
1figura da resposta escolhida
answer figure call_a236a852:coef.lrprice (infer.iv_2sls)
obrigatóriapassou—"call_a236a852:coef.lrprice"——call_a236a852
2ferramenta chamada
answer call is infer.iv_2sls
obrigatóriapassou—"infer.iv_2sls"——call_a236a852
3argumento igual
infer.iv_2sls.y = 'lpacks'
obrigatóriapassou"lpacks""lpacks"——call_a236a852
4argumento igual
infer.iv_2sls.endog = ['lrprice']
obrigatóriapassou["lrprice"]["lrprice"]——call_a236a852
5argumento igual
infer.iv_2sls.instruments = ['salestax', 'cigtax']
obrigatóriapassou["salestax","cigtax"]["salestax","cigtax"]——call_a236a852
6argumento igual
infer.iv_2sls.exog = ['lrincome']
obrigatóriapassou["lrincome"]["lrincome"]——call_a236a852
7diagnóstico
48 vs 48
obrigatóriapassou48484848default rel 1e-6 (abs floor 1e-6)—call_a236a852
8figura da resposta próxima
-1.277424133 vs -1.2774241334268481
obrigatóriapassou-1,27742-1.2774241334268481-1,27742-1.2774241334272798relativa 0.000001 · absoluta 2.4961000039848985e-7stock_watson_2007.eq12_16.softwarecall_a236a852
9figura da resposta próxima
0.2496100004 vs 0.24961000039848988
obrigatóriapassou0,249610.249610000398489880,249610.24961000039814105relativa 0.000001 · absoluta 2.4961000039848985e-7stock_watson_2007.eq12_16.softwarecall_a236a852
10figura da resposta próxima
-1.277424133 vs -1.28
registradapassou-1,28-1.28-1,27742-1.2774241334272798published_cell d=2 · absoluta 0.00500000128stock_watson_2007.eq12_16.papercall_a236a852
11figura da resposta próxima
0.2496100004 vs 0.25
registradapassou0,250.250,249610.24961000039814105published_cell d=2 (the SE as printed) · absoluta 0.0050000010000000004stock_watson_2007.eq12_16.papercall_a236a852

Caminho de referência e caminho do agente

A chamada de referência ao lado da chamada que deu a resposta, argumento por argumento.

a tarefa T1 do mesmo alvo (paper_repro.stock_watson_2007.eq12_16.tool)

Referência: infer.iv_2slsChamada do agente: infer.iv_2sls (call_a236a852)igual
Argumentos da referência e do agente
ArgumentoReferênciaAgente
cluster——não fixado pela referência
dataset"cigarettes""cigarettes"igual
endog["lrprice"]["lrprice"]igual
exog["lrincome"]["lrincome"]igual
instruments["salestax","cigtax"]["salestax","cigtax"]igual
level—0,950.95não fixado pela referência
se"HC1""HC1"igual
subset"year == 1995""year == 1995"igual
y"lpacks""lpacks"igual

Trajetória

Cada evento na ordem em que aconteceu: turnos do modelo, chamadas de ferramentas, guardas, transformações e pontuação.

  1. 0Início

    Stock and Watson, Introduction to Econometrics (2nd edition), Chapter 12, equation (12.16): using the 1995 cross-section of the 48 continental U.S. states, estimate by two-stage least squares the price elasticity of cigarette demand, the effect of the log of the real price per pack (taxes included) on the log of packs per capita, with the log of real per capita income as an included exogenous regressor, using as instruments the real general sales tax per pack and the real cigarette-specific tax per pack (two instruments). Use heteroskedasticity-robust standard errors. Report the coefficient on the log real price.

    cigarettes (agent)

    Stock and Watson's cigarette consumption panel for the 48 continental U.S. states, 1985 and 1995, as distributed in the R package AER (data set CigarettesSW, served by Rdatasets); one row per state and year (96 rows). Columns: state; year; cpi, the consumer price index; population; packs, packs of cigarettes per capita; income, total state personal income (nominal); tax, the average state, federal and local excise taxes per pack (cents); price, the average price per pack including taxes (cents); taxs, the average excise taxes per pack including sales tax (cents). Added by the declared transforms: rprice = price / cpi, the real price; lrprice = log(rprice); lpacks = log(packs); rincome = income / population / cpi, real per capita income; lrincome = log(rincome); salestax = (taxs - tax) / cpi, the real general sales tax per pack; cigtax = tax / cpi, the real cigarette-specific tax per pack; and the intermediate columns income_pc and sales_tax_nominal.

    file 629e887a8104d483d450a9bbe487cb5613e62d116c4ecc84d6c8893b7393fcd2 · frame —
    1. derive {"args":{"left":"price","right":"cpi"},"name":"rprice","op":"ratio"}
    2. derive {"args":{"column":"rprice"},"name":"lrprice","op":"log"}
    3. derive {"args":{"column":"packs"},"name":"lpacks","op":"log"}
    4. derive {"args":{"left":"income","right":"population"},"name":"income_pc","op":"ratio"}
    5. derive {"args":{"left":"income_pc","right":"cpi"},"name":"rincome","op":"ratio"}
    6. derive {"args":{"column":"rincome"},"name":"lrincome","op":"log"}
    7. derive {"args":{"left":"taxs","right":"tax"},"name":"sales_tax_nominal","op":"diff"}
    8. derive {"args":{"left":"sales_tax_nominal","right":"cpi"},"name":"salestax","op":"ratio"}
    9. derive {"args":{"left":"tax","right":"cpi"},"name":"cigtax","op":"ratio"}
  2. 1Transformação
    cigarettes · derive {"args":{"left":"price","right":"cpi"},"name":"rprice","op":"ratio"}
    96 → 96 linhas
    Frame antes → depois: edb46c0b5416 → ef8fa78f0390
  3. 2Transformação
    cigarettes · derive {"args":{"column":"rprice"},"name":"lrprice","op":"log"}
    96 → 96 linhas
    Frame antes → depois: ef8fa78f0390 → e105ed6c1d84
  4. 3Transformação
    cigarettes · derive {"args":{"column":"packs"},"name":"lpacks","op":"log"}
    96 → 96 linhas
    Frame antes → depois: e105ed6c1d84 → d62b932706e1
  5. 4Transformação
    cigarettes · derive {"args":{"left":"income","right":"population"},"name":"income_pc","op":"ratio"}
    96 → 96 linhas
    Frame antes → depois: d62b932706e1 → e733a0b104f8
  6. 5Transformação
    cigarettes · derive {"args":{"left":"income_pc","right":"cpi"},"name":"rincome","op":"ratio"}
    96 → 96 linhas
    Frame antes → depois: e733a0b104f8 → e3dc0e2e1b4a
  7. 6Transformação
    cigarettes · derive {"args":{"column":"rincome"},"name":"lrincome","op":"log"}
    96 → 96 linhas
    Frame antes → depois: e3dc0e2e1b4a → e131ae1b8f79
  8. 7Transformação
    cigarettes · derive {"args":{"left":"taxs","right":"tax"},"name":"sales_tax_nominal","op":"diff"}
    96 → 96 linhas
    Frame antes → depois: e131ae1b8f79 → ad36a62c9d85
  9. 8Transformação
    cigarettes · derive {"args":{"left":"sales_tax_nominal","right":"cpi"},"name":"salestax","op":"ratio"}
    96 → 96 linhas
    Frame antes → depois: ad36a62c9d85 → 33ace4f530f2
  10. 9Transformação
    cigarettes · derive {"args":{"left":"tax","right":"cpi"},"name":"cigtax","op":"ratio"}
    96 → 96 linhas
    Frame antes → depois: 33ace4f530f2 → be62d9713478
  11. 10Turno do modelo
    call_0a71b15ereferenceFim: tool_use0 ms0 de entrada · 0 de saída · 0 de raciocínio · 0 em cache
    Texto visível

    Equation (12.16): TSLS of log packs per capita on the log real price with log real per capita income, instrumented by the real general sales tax per pack and the real cigarette-specific tax per pack (two instruments), 1995, heteroskedasticity-robust errors.

    Chamadas pedidas
    • infer.iv_2sls
      {
        "dataset": "cigarettes",
        "endog": [
          "lrprice"
        ],
        "exog": [
          "lrincome"
        ],
        "instruments": [
          "salestax",
          "cigtax"
        ],
        "se": "HC1",
        "subset": "year == 1995",
        "y": "lpacks"
      }
  12. 11Ferramenta
    infer.iv_2slsv0.1.0call_a236a852decidido pelo modeloreexecutável

    Motivo: Equation (12.16): TSLS of log packs per capita on the log real price with log real per capita income, instrumented by the real general sales tax per pack and the real cigarette-specific tax per pack (two instruments), 1995, heteroskedasticity-robust errors.

    Argumentos
    {
      "cluster": null,
      "dataset": "cigarettes",
      "endog": [
        "lrprice"
      ],
      "exog": [
        "lrincome"
      ],
      "instruments": [
        "salestax",
        "cigtax"
      ],
      "level": 0.95,
      "se": "HC1",
      "subset": "year == 1995",
      "y": "lpacks"
    }
    Figuras call_a236a852
    ChaveValorValor brutoErro-padrãoIC
    coef.lrprice
    2SLS effect of lrprice on lpacks
    -1,27742 -1.27742413342727980,249610.24961000039814105-1,78016 – -0,774684
    Diagnósticos
    • first_stage_F.lrprice = 209,676209.67626939658422
    • partial_r2.lrprice = 0,9175210.9175207497862164
    • weak_instrument = false
    • overid_p = 0,5641190.5641191400175725
    • sargan = 0,3326220.3326221419365281
    • sargan_df = 11
    • n_obs = 4848
    • se_type = "HC1"
    • n_clusters = —
    Tabelas (3)
    {
      "coefficients": [
        {
          "ci_high": 11.826917636464222,
          "ci_low": 7.962993445846207,
          "coef": 9.894955541155214,
          "p": 1.9467019162255485e-13,
          "se": 0.9592169428712987,
          "t": 10.31565967917109,
          "term": "Intercept"
        },
        {
          "ci_high": 0.7917648364356482,
          "ci_low": -0.230955186268808,
          "coef": 0.2804048250834201,
          "p": 0.27527475270032126,
          "se": 0.253889653418621,
          "t": 1.104435810233984,
          "term": "lrincome"
        },
        {
          "ci_high": -0.7746837857268345,
          "ci_low": -1.780164481127725,
          "coef": -1.2774241334272798,
          "p": 0.000006210718082934866,
          "se": 0.24961000039814105,
          "t": -5.117680106525064,
          "term": "lrprice"
        }
      ],
      "first_stage": [
        {
          "ci_high": 0.015195848681257965,
          "ci_low": 0.006583808496625783,
          "coef": 0.010889828588941873,
          "endog": "lrprice",
          "instrument": "salestax",
          "p": 0.000006998551744539232,
          "se": 0.002136592920775031,
          "t": 5.096819559334532
        },
        {
          "ci_high": 0.01110467130342385,
          "ci_low": 0.00759872486537743,
          "coef": 0.00935169808440064,
          "endog": "lrprice",
          "instrument": "cigtax",
          "p": 6.820207505550646e-14,
          "se": 0.000869803226593554,
          "t": 10.751509994996315
        }
      ],
      "reduced_form": [
        {
          "ci_high": 0.018864366404242393,
          "ci_low": -0.03402221946515445,
          "coef": -0.007578926530456026,
          "instrument": "salestax",
          "p": 0.5664612772562537,
          "se": 0.01312082881059387,
          "t": -0.5776255936162153
        },
        {
          "ci_high": -0.005510298460779281,
          "ci_low": -0.021395893113518166,
          "coef": -0.013453095787148723,
          "instrument": "cigtax",
          "p": 0.001387396539754572,
          "se": 0.003941115966679991,
          "t": -3.4135244689289506
        }
      ]
    }
    Digests dos dados
    cigarettes be62d9713478ba73b51e4f20f511318a57aa1535f2538e36c274004942f80a1f
    sha256 do resultado
    882c7b1c336e02255fa4ad2b763f0a0af6079b5bade03c1525ea4946d1aee1c8
  13. 12Turno do modelo
    call_2eff65e1referenceFim: tool_use0 ms0 de entrada · 0 de saída · 0 de raciocínio · 0 em cache
    Chamadas pedidas
    • submit_answer (meta-ferramenta)
      {
        "answer": "Estimativa (infer.iv_2sls): coef.lrprice = -1,277.",
        "caveats": [],
        "figure_refs": [
          "call_a236a852:coef.lrprice"
        ]
      }
  14. 13Guarda
    resposta aceita
    Números encontrados
    -1,277
    Sem lastro
    —
    Não citados
    —
    1 nova(s) tentativa(s) restante(s)
  15. 14Resposta

    Estimativa (infer.iv_2sls): coef.lrprice = -1,277.

    Figuras citadas: call_a236a852:coef.lrprice · Parada: answered
    Figura da resposta: call_a236a852:coef.lrprice = -1,27742-1.2774241334272798 (se 0,249610.24961000039814105)
  16. 15Pontuação
    #0resposta com lastropassouobrigatóriaevery number backed
  17. 16Pontuação
    #1figura da resposta escolhidapassouobrigatóriaanswer figure call_a236a852:coef.lrprice (infer.iv_2sls)
  18. 17Pontuação
    #2ferramenta chamadapassouobrigatóriaanswer call is infer.iv_2sls
  19. 18Pontuação
    #3argumento igualpassouobrigatóriainfer.iv_2sls.y = 'lpacks'
  20. 19Pontuação
    #4argumento igualpassouobrigatóriainfer.iv_2sls.endog = ['lrprice']
  21. 20Pontuação
    #5argumento igualpassouobrigatóriainfer.iv_2sls.instruments = ['salestax', 'cigtax']
  22. 21Pontuação
    #6argumento igualpassouobrigatóriainfer.iv_2sls.exog = ['lrincome']
  23. 22Pontuação
    #7diagnósticopassouobrigatória48 vs 48
  24. 23Pontuação
    #8figura da resposta próximapassouobrigatória-1.277424133 vs -1.2774241334268481
  25. 24Pontuação
    #9figura da resposta próximapassouobrigatória0.2496100004 vs 0.24961000039848988
  26. 25Pontuação
    #10figura da resposta próximapassouregistrada-1.277424133 vs -1.28
  27. 26Pontuação
    #11figura da resposta próximapassouregistrada0.2496100004 vs 0.25

Épocas × verificações

Resultado de cada verificação em cada época pontuada
#01234567891011
Época 1passoupassoupassoupassoupassoupassoupassoupassoupassoupassoupassoupassou

Tentativas

Cada tentativa é seu próprio arquivo e é publicada; só a última de cada época é pontuada.

Downloads desta tarefa

Pacote da tarefa (.zip)
90,0 KB · sha256 5bf34b99bbeee55f2cd1011163abcf1199a2942c7c07329a5f8aa8f5b0dd9150

O hash de um zip é só de transporte: o que ancora a integridade é o RUN_SHA256SUMS que vai dentro dele, cópia exata do SHA256SUMS da execução.

Downloads desta tarefa
ArquivoTamanhosha256
attachments/196737ac52716631d6abd503652942b4d37024a33a533c0a36c75af352733f67.json2,1 KB196737ac52716631d6abd503652942b4d37024a33a533c0a36c75af352733f67
attachments/1f41749ab3601ccab0c1c0bf2cea0fbb15e464c238004feb0a25e18dfee4f1a9.json500 B1f41749ab3601ccab0c1c0bf2cea0fbb15e464c238004feb0a25e18dfee4f1a9
attachments/298864aa70c0c51c7afb25c57eaede2c4800dd8942f05428dce7985766339f13.json1,6 KB298864aa70c0c51c7afb25c57eaede2c4800dd8942f05428dce7985766339f13
attachments/433a6877aa6a378bbd4b7e2752e484d8cb7499c562d68222be231f62ff2fa420.json2,4 KB433a6877aa6a378bbd4b7e2752e484d8cb7499c562d68222be231f62ff2fa420
attachments/52ab03d8ec104abb85572294bf8a469d75c5de9e74d6042caabff8017adc572b.json64,0 KB52ab03d8ec104abb85572294bf8a469d75c5de9e74d6042caabff8017adc572b
attachments/c30ab724a17d5addda2b57d7f1bbe06c4d01b7c9923289a0c4e579645d0cdff4.json645 Bc30ab724a17d5addda2b57d7f1bbe06c4d01b7c9923289a0c4e579645d0cdff4
attachments/ec6f1428b9a54100487cfd2aeb6327a8d33b729cd6bb7ea9fa1cb8f38fb32caa.json2,0 KBec6f1428b9a54100487cfd2aeb6327a8d33b729cd6bb7ea9fa1cb8f38fb32caa
native/paper_repro/paper_repro.stock_watson_2007.eq12_16.agent.e1.a1.json36 B39a1ffcef98d10bf196fee2aa93ee0343ff9c7c2b32629831f61ccb9c4e8fdd7
sources/stock_watson_2007.eq12_16.paper.json1,9 KB81ba66cb108d90b0d40441aa7764b0980aef9456a190ddc4ed94537762325cc5
sources/stock_watson_2007.eq12_16.software.json1,5 KB6d00c378c09b3cc795b4cc7f992deb1a4c7def396a0b7212d008ca961ea116d9
specs/paper_repro.stock_watson_2007.eq12_16.agent.json9,8 KB9deb943ae5c6ab86aa47ed0293be7bdb6ca76f2ee18dc8fd5025cd9d91dffb49
traces/paper_repro.stock_watson_2007.eq12_16.agent.e1.a1.jsonl23,7 KB5e9cf9ecf1fdf1ff13014b7486f0230fc9bc8636a5f4867d4d44103cc56901fa
trajectories/paper_repro.stock_watson_2007.eq12_16.agent.e1.a1.jsonl23,5 KB676bee29cbb2416e7af05a44df26fd5115d913ad384c7c14c9eda0023015e7a6