Pular para o conteúdo

Tarefa paper_repro.stock_watson_2007.eq12_15.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.15): 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 (one instrument). Use heteroskedasticity-robust standard errors. Report the coefficient on the log real price.

Resposta

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

Valores esperados e de onde vêm

stock_watson_2007.eq12_15.software

Fonte
linearmodels 7.0: the reference specification of stock_watson_2007 eq12_15 (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 (one instrument) (equation (12.15) as the AER package's CigarettesSW examples number it), coefficient on ln(P cigarettes)
Valor
-1,14338-1.1433751222057253 (se 0,3723030.3723026878825464)
Conferido por
execução de software · IV2SLS(dependent=lpacks, exog=[const, lrincome], endog=['lrprice'], instruments=['salestax']).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,14338-1.1433751222057253 · relativa 0.000001 · absoluta 3.7230268788254636e-7
  • #9 figura da resposta próxima: 0,3723030.3723026878825464 · relativa 0.000001 · absoluta 3.7230268788254636e-7

stock_watson_2007.eq12_15.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 (one instrument) (equation (12.15) 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 (m = 1): −1.14 ln(P) (0.37)
Valor como publicado
−1.14
Erro-padrão como publicado
0.37
Valor
-1,14-1.14 (se 0,370.37) 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.43 – 1.14 ln(P) + 0.21 ln(Income) with (1.26) (0.37) (0.31); 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,14-1.14 · published_cell d=2 · absoluta 0.00500000114
  • #11 figura da resposta próxima: 0,370.37 · 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_2a758b17:coef.lrprice (infer.iv_2sls)
obrigatóriapassou—"call_2a758b17:coef.lrprice"——call_2a758b17
2ferramenta chamada
answer call is infer.iv_2sls
obrigatóriapassou—"infer.iv_2sls"——call_2a758b17
3argumento igual
infer.iv_2sls.y = 'lpacks'
obrigatóriapassou"lpacks""lpacks"——call_2a758b17
4argumento igual
infer.iv_2sls.endog = ['lrprice']
obrigatóriapassou["lrprice"]["lrprice"]——call_2a758b17
5argumento igual
infer.iv_2sls.instruments = ['salestax']
obrigatóriapassou["salestax"]["salestax"]——call_2a758b17
6argumento igual
infer.iv_2sls.exog = ['lrincome']
obrigatóriapassou["lrincome"]["lrincome"]——call_2a758b17
7diagnóstico
48 vs 48
obrigatóriapassou48484848default rel 1e-6 (abs floor 1e-6)—call_2a758b17
8figura da resposta próxima
-1.143375122 vs -1.1433751222057253
obrigatóriapassou-1,14338-1.1433751222057253-1,14338-1.1433751222046427relativa 0.000001 · absoluta 3.7230268788254636e-7stock_watson_2007.eq12_15.softwarecall_2a758b17
9figura da resposta próxima
0.3723026879 vs 0.3723026878825464
obrigatóriapassou0,3723030.37230268788254640,3723030.37230268788205256relativa 0.000001 · absoluta 3.7230268788254636e-7stock_watson_2007.eq12_15.softwarecall_2a758b17
10figura da resposta próxima
-1.143375122 vs -1.14
registradapassou-1,14-1.14-1,14338-1.1433751222046427published_cell d=2 · absoluta 0.00500000114stock_watson_2007.eq12_15.papercall_2a758b17
11figura da resposta próxima
0.3723026879 vs 0.37
registradapassou0,370.370,3723030.37230268788205256published_cell d=2 (the SE as printed) · absoluta 0.0050000010000000004stock_watson_2007.eq12_15.papercall_2a758b17

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_15.tool)

Referência: infer.iv_2slsChamada do agente: infer.iv_2sls (call_2a758b17)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"]["salestax"]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.15): 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 (one instrument). 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_00617b91referenceFim: tool_use0 ms0 de entrada · 0 de saída · 0 de raciocínio · 0 em cache
    Texto visível

    Equation (12.15): 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 (one instrument), 1995, heteroskedasticity-robust errors.

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

    Motivo: Equation (12.15): 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 (one instrument), 1995, heteroskedasticity-robust errors.

    Argumentos
    {
      "cluster": null,
      "dataset": "cigarettes",
      "endog": [
        "lrprice"
      ],
      "exog": [
        "lrincome"
      ],
      "instruments": [
        "salestax"
      ],
      "level": 0.95,
      "se": "HC1",
      "subset": "year == 1995",
      "y": "lpacks"
    }
    Figuras call_2a758b17
    ChaveValorValor brutoErro-padrãoIC
    coef.lrprice
    2SLS effect of lrprice on lpacks
    -1,14338 -1.14337512220464270,3723030.37230268788205256-1,89323 – -0,393519
    Diagnósticos
    • first_stage_F.lrprice = 44,730544.73052609751419
    • partial_r2.lrprice = 0,5008750.5008749584593202
    • weak_instrument = false
    • n_obs = 4848
    • se_type = "HC1"
    • n_clusters = —
    Tabelas (3)
    {
      "coefficients": [
        {
          "ci_high": 11.967205091180688,
          "ci_low": 6.894111473859334,
          "coef": 9.43065828252001,
          "p": 1.9347091289548336e-9,
          "se": 1.259392552866976,
          "t": 7.488259527223144,
          "term": "Intercept"
        },
        {
          "ci_high": 0.8424058176682854,
          "ci_low": -0.4133752478829076,
          "coef": 0.21451528489268892,
          "p": 0.4949173265984433,
          "se": 0.31174692234865325,
          "t": 0.6881071456185159,
          "term": "lrincome"
        },
        {
          "ci_high": -0.3935190168519527,
          "ci_low": -1.8932312275573326,
          "coef": -1.1433751222046427,
          "p": 0.0036113016470748853,
          "se": 0.37230268788205256,
          "t": -3.0710901624402718,
          "term": "lrprice"
        }
      ],
      "first_stage": [
        {
          "ci_high": 0.03564472070362677,
          "ci_low": 0.019144934277020482,
          "coef": 0.027394827490323626,
          "endog": "lrprice",
          "instrument": "salestax",
          "p": 2.9604168061920883e-8,
          "se": 0.00409606242601442,
          "t": 6.6880883739312385
        }
      ],
      "reduced_form": [
        {
          "ci_high": -0.008697273018631435,
          "ci_low": -0.05394785544041579,
          "coef": -0.03132256422952361,
          "instrument": "salestax",
          "p": 0.007736241468742754,
          "se": 0.011233430883339168,
          "t": -2.7883346196556555
        }
      ]
    }
    Digests dos dados
    cigarettes be62d9713478ba73b51e4f20f511318a57aa1535f2538e36c274004942f80a1f
    sha256 do resultado
    136470c2dd064f354f6ed6d6fa9d4953c47add185ad3d4f26a7b7ec7e296eaa4
  13. 12Turno do modelo
    call_9a5fd1ffreferenceFim: 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,143.",
        "caveats": [],
        "figure_refs": [
          "call_2a758b17:coef.lrprice"
        ]
      }
  14. 13Guarda
    resposta aceita
    Números encontrados
    -1,143
    Sem lastro
    —
    Não citados
    —
    1 nova(s) tentativa(s) restante(s)
  15. 14Resposta

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

    Figuras citadas: call_2a758b17:coef.lrprice · Parada: answered
    Figura da resposta: call_2a758b17:coef.lrprice = -1,14338-1.1433751222046427 (se 0,3723030.37230268788205256)
  16. 15Pontuação
    #0resposta com lastropassouobrigatóriaevery number backed
  17. 16Pontuação
    #1figura da resposta escolhidapassouobrigatóriaanswer figure call_2a758b17: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']
  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.143375122 vs -1.1433751222057253
  25. 24Pontuação
    #9figura da resposta próximapassouobrigatória0.3723026879 vs 0.3723026878825464
  26. 25Pontuação
    #10figura da resposta próximapassouregistrada-1.143375122 vs -1.14
  27. 26Pontuação
    #11figura da resposta próximapassouregistrada0.3723026879 vs 0.37

É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)
89,0 KB · sha256 0d27a36a9ff7cd24cf3fc96c89c8c70d251dafffed26354c291693d82cb0b28d

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/08ccd1bfbfab5d10d22cce5b0821af075ad609c96a696ef6d646e0d916b52126.json599 B08ccd1bfbfab5d10d22cce5b0821af075ad609c96a696ef6d646e0d916b52126
attachments/298864aa70c0c51c7afb25c57eaede2c4800dd8942f05428dce7985766339f13.json1,6 KB298864aa70c0c51c7afb25c57eaede2c4800dd8942f05428dce7985766339f13
attachments/3437bab952b3bee3ae4ffa19f245ff7504d9a7b6bab2a62acc9e358c3de18ca0.json1,6 KB3437bab952b3bee3ae4ffa19f245ff7504d9a7b6bab2a62acc9e358c3de18ca0
attachments/3477b950d5a289d1dc63a5dfb86d51d9ddd04a4977541b59ac027f74697af641.json445 B3477b950d5a289d1dc63a5dfb86d51d9ddd04a4977541b59ac027f74697af641
attachments/433a6877aa6a378bbd4b7e2752e484d8cb7499c562d68222be231f62ff2fa420.json2,4 KB433a6877aa6a378bbd4b7e2752e484d8cb7499c562d68222be231f62ff2fa420
attachments/52ab03d8ec104abb85572294bf8a469d75c5de9e74d6042caabff8017adc572b.json64,0 KB52ab03d8ec104abb85572294bf8a469d75c5de9e74d6042caabff8017adc572b
attachments/655cc7634f204aa3f87540955bc5f5e4b9b42ffb07bc585b25347685d9a57294.json1,5 KB655cc7634f204aa3f87540955bc5f5e4b9b42ffb07bc585b25347685d9a57294
native/paper_repro/paper_repro.stock_watson_2007.eq12_15.agent.e1.a1.json36 B39a1ffcef98d10bf196fee2aa93ee0343ff9c7c2b32629831f61ccb9c4e8fdd7
sources/stock_watson_2007.eq12_15.paper.json1,8 KB7bdb6c55c54ebae4315f9e7bf44101a743f21eead6c8e2c27ea90652c59e6207
sources/stock_watson_2007.eq12_15.software.json1,4 KB992610eb26046b834bdf345ecc599af43409ef33dcc87e3689ca459b99758070
specs/paper_repro.stock_watson_2007.eq12_15.agent.json9,6 KB13e3905f2b3ad2d634e5953a910637e97a7afe02160a62b487b45a52bcf8aa26
traces/paper_repro.stock_watson_2007.eq12_15.agent.e1.a1.jsonl22,8 KB2d35dc4245a00a49b731089771d36d3153d882b6633bdb7915534d6b53d0e52c
trajectories/paper_repro.stock_watson_2007.eq12_15.agent.e1.a1.jsonl22,7 KBa16bccdb8fd5032a2f9db779ba7b9baf8c86d07e41c8b288358a9117c416ba04