SlideShare une entreprise Scribd logo
1  sur  11
{estout} for R
             Regression Output for *.csv, *.tex Formats

                                  Ben Mazzotta

                                   Fletcher School


                                 August 24, 2010




Ben Mazzotta (Fletcher School)       Estout Demo     August 24, 2010   1 / 11
1     Regression Output




2     {estout}




    Ben Mazzotta (Fletcher School)   Estout Demo   August 24, 2010   2 / 11
Regression




                                          Y = βX + γC +                                        (1)

                                  Figure 1: A generic OLS regression model



Key features
      Multiple specifications
      α significance level
      σβ precision of the coefficient estimates



 Ben Mazzotta (Fletcher School)                  Estout Demo                 August 24, 2010   3 / 11
Output




                                  Figure 2: Sample outreg output



 Ben Mazzotta (Fletcher School)             Estout Demo            August 24, 2010   4 / 11
1     Regression Output




2     {estout}




    Ben Mazzotta (Fletcher School)   Estout Demo   August 24, 2010   5 / 11
Code I


Preliminaries
library(datasets)
data(freeny)
names(freeny)
names(freeny) <- c("y","lag.rev","price","income", "potential")

Regressions
reg1 <- lm(y ~ lag.rev + price, data=freeny)
reg2 <- lm(y ~ lag.rev + price + income, data=freeny)
reg3 <- lm(y ~ lag.rev + price + income + potential, data=freeny)
Code II


Output descriptive statistics
# Open the estout package
library(estout)

# Write the descriptive statistics
# Specify the objects
descsto(freeny)
# Write to files
desctab(filename="freeny", csv=FALSE)
desctab(filename="freeny", csv=TRUE)




 Ben Mazzotta (Fletcher School)   Estout Demo   August 24, 2010   7 / 11
Code III



Output regression estimates
# Store the objects
eststo(reg1)
eststo(reg2)
eststo(reg3)
# Write to file
esttab(filename="freeny.reg", csv=FALSE)
esttab(filename="freeny.reg", csv=TRUE)
Descriptive Statistics in LaTeX

                             Min.    1st Qu.   Median        Mean    3rd Qu.   Max.    Missing Values
 y                           8.791    9.045    9.314         9.306    9.591    9.794         0
 lag.quarterly.revenue       8.791     9.02    9.284         9.281    9.561    9.775         0
 price.index                 4.278    4.392     4.51         4.496    4.605     4.71         0
 income.level                5.821    5.948    6.061         6.039    6.139     6.2          0
 market.potential            12.97    13.01    13.07         13.07    13.12    13.17         0




 Ben Mazzotta (Fletcher School)                Estout Demo                        August 24, 2010   9 / 11
Regression in CSV




                                  Figure 3: CSV format output



 Ben Mazzotta (Fletcher School)           Estout Demo           August 24, 2010   10 / 11
Regression in LaTeX
                                         (1)            (2)            (3)
                                           y              y               y
                 (Intercept)             2.186       4.971∗∗∗        -10.473∗
                                       (1.472)         (1.24)         (6.022)
                 lag.rev               0.891∗∗∗      0.373∗∗∗          0.124
                                       (0.074)        (0.114)         (0.142)
                 price                  -0.256       -0.819∗∗∗       -0.754∗∗∗
                                       (0.175)        (0.172)         (0.161)
                 income                              0.754∗∗∗        0.767∗∗∗
                                                      (0.145)         (0.134)
                 potential                                            1.331∗∗
                                                                      (0.509)
                 R2                     0.996          0.998           0.998
                 adj.R 2                0.996          0.997           0.998
                 N                       39             39               39
                 Standard errors in parentheses
                 ∗                ∗∗                 ∗∗∗
                     (p ≤ 0.1),        (p ≤ 0.05),         (p ≤ 0.01)
                                  Table 1: LaTeX format output


 Ben Mazzotta (Fletcher School)                        Estout Demo               August 24, 2010   11 / 11

Contenu connexe

En vedette (16)

Ankara
AnkaraAnkara
Ankara
 
Siemens_1
Siemens_1Siemens_1
Siemens_1
 
Teclado
TecladoTeclado
Teclado
 
135
135135
135
 
Splash page_3
Splash page_3Splash page_3
Splash page_3
 
Internet Segura
Internet SeguraInternet Segura
Internet Segura
 
Russian Startup Tour
Russian Startup TourRussian Startup Tour
Russian Startup Tour
 
Comunicación e Interaccion Social en la Web
Comunicación e Interaccion Social en la WebComunicación e Interaccion Social en la Web
Comunicación e Interaccion Social en la Web
 
Operation orion
Operation orionOperation orion
Operation orion
 
Mafo Poster-1
Mafo Poster-1Mafo Poster-1
Mafo Poster-1
 
workplace H&S
workplace H&Sworkplace H&S
workplace H&S
 
VIDEO: How to successfully use social media in business
VIDEO: How to successfully use social media in businessVIDEO: How to successfully use social media in business
VIDEO: How to successfully use social media in business
 
النجم
النجمالنجم
النجم
 
Mapa conceptual
Mapa conceptualMapa conceptual
Mapa conceptual
 
Test
TestTest
Test
 
QMS lead auditor certificate
QMS lead auditor certificateQMS lead auditor certificate
QMS lead auditor certificate
 

Similaire à Estout demo

Adobe AIR: Stage3D and AGAL
Adobe AIR: Stage3D and AGALAdobe AIR: Stage3D and AGAL
Adobe AIR: Stage3D and AGALDaniel Freeman
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)asghar123456
 
Rmpiとsnowで 並列処理
Rmpiとsnowで 並列処理Rmpiとsnowで 並列処理
Rmpiとsnowで 並列処理Masafumi Okada
 
Distilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental DataDistilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental Dataswissnex San Francisco
 
CA NOTES ON RISK, RETURN AND PORTFOLIO PRACTICALS OF STRATEGIC FINANCIAL MODE...
CA NOTES ON RISK, RETURN AND PORTFOLIO PRACTICALS OF STRATEGIC FINANCIAL MODE...CA NOTES ON RISK, RETURN AND PORTFOLIO PRACTICALS OF STRATEGIC FINANCIAL MODE...
CA NOTES ON RISK, RETURN AND PORTFOLIO PRACTICALS OF STRATEGIC FINANCIAL MODE...Kanoon Ke Rakhwale India
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson MethodJigisha Dabhi
 
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODELSEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODELgrssieee
 
MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)hasnulslides
 
Cosmological Perturbations and Numerical Simulations
Cosmological Perturbations and Numerical SimulationsCosmological Perturbations and Numerical Simulations
Cosmological Perturbations and Numerical SimulationsIan Huston
 

Similaire à Estout demo (14)

09 Normal Trans
09 Normal Trans09 Normal Trans
09 Normal Trans
 
Adobe AIR: Stage3D and AGAL
Adobe AIR: Stage3D and AGALAdobe AIR: Stage3D and AGAL
Adobe AIR: Stage3D and AGAL
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)
 
Rmpiとsnowで 並列処理
Rmpiとsnowで 並列処理Rmpiとsnowで 並列処理
Rmpiとsnowで 並列処理
 
Distilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental DataDistilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental Data
 
CA NOTES ON RISK, RETURN AND PORTFOLIO PRACTICALS OF STRATEGIC FINANCIAL MODE...
CA NOTES ON RISK, RETURN AND PORTFOLIO PRACTICALS OF STRATEGIC FINANCIAL MODE...CA NOTES ON RISK, RETURN AND PORTFOLIO PRACTICALS OF STRATEGIC FINANCIAL MODE...
CA NOTES ON RISK, RETURN AND PORTFOLIO PRACTICALS OF STRATEGIC FINANCIAL MODE...
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson Method
 
Goiken2007slide
Goiken2007slideGoiken2007slide
Goiken2007slide
 
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODELSEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
 
Mark 20121024
Mark 20121024Mark 20121024
Mark 20121024
 
Bessel functionsoffractionalorder1
Bessel functionsoffractionalorder1Bessel functionsoffractionalorder1
Bessel functionsoffractionalorder1
 
MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)
 
Cosmological Perturbations and Numerical Simulations
Cosmological Perturbations and Numerical SimulationsCosmological Perturbations and Numerical Simulations
Cosmological Perturbations and Numerical Simulations
 
smtlecture.9
smtlecture.9smtlecture.9
smtlecture.9
 

Dernier

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Dernier (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Estout demo

  • 1. {estout} for R Regression Output for *.csv, *.tex Formats Ben Mazzotta Fletcher School August 24, 2010 Ben Mazzotta (Fletcher School) Estout Demo August 24, 2010 1 / 11
  • 2. 1 Regression Output 2 {estout} Ben Mazzotta (Fletcher School) Estout Demo August 24, 2010 2 / 11
  • 3. Regression Y = βX + γC + (1) Figure 1: A generic OLS regression model Key features Multiple specifications α significance level σβ precision of the coefficient estimates Ben Mazzotta (Fletcher School) Estout Demo August 24, 2010 3 / 11
  • 4. Output Figure 2: Sample outreg output Ben Mazzotta (Fletcher School) Estout Demo August 24, 2010 4 / 11
  • 5. 1 Regression Output 2 {estout} Ben Mazzotta (Fletcher School) Estout Demo August 24, 2010 5 / 11
  • 6. Code I Preliminaries library(datasets) data(freeny) names(freeny) names(freeny) <- c("y","lag.rev","price","income", "potential") Regressions reg1 <- lm(y ~ lag.rev + price, data=freeny) reg2 <- lm(y ~ lag.rev + price + income, data=freeny) reg3 <- lm(y ~ lag.rev + price + income + potential, data=freeny)
  • 7. Code II Output descriptive statistics # Open the estout package library(estout) # Write the descriptive statistics # Specify the objects descsto(freeny) # Write to files desctab(filename="freeny", csv=FALSE) desctab(filename="freeny", csv=TRUE) Ben Mazzotta (Fletcher School) Estout Demo August 24, 2010 7 / 11
  • 8. Code III Output regression estimates # Store the objects eststo(reg1) eststo(reg2) eststo(reg3) # Write to file esttab(filename="freeny.reg", csv=FALSE) esttab(filename="freeny.reg", csv=TRUE)
  • 9. Descriptive Statistics in LaTeX Min. 1st Qu. Median Mean 3rd Qu. Max. Missing Values y 8.791 9.045 9.314 9.306 9.591 9.794 0 lag.quarterly.revenue 8.791 9.02 9.284 9.281 9.561 9.775 0 price.index 4.278 4.392 4.51 4.496 4.605 4.71 0 income.level 5.821 5.948 6.061 6.039 6.139 6.2 0 market.potential 12.97 13.01 13.07 13.07 13.12 13.17 0 Ben Mazzotta (Fletcher School) Estout Demo August 24, 2010 9 / 11
  • 10. Regression in CSV Figure 3: CSV format output Ben Mazzotta (Fletcher School) Estout Demo August 24, 2010 10 / 11
  • 11. Regression in LaTeX (1) (2) (3) y y y (Intercept) 2.186 4.971∗∗∗ -10.473∗ (1.472) (1.24) (6.022) lag.rev 0.891∗∗∗ 0.373∗∗∗ 0.124 (0.074) (0.114) (0.142) price -0.256 -0.819∗∗∗ -0.754∗∗∗ (0.175) (0.172) (0.161) income 0.754∗∗∗ 0.767∗∗∗ (0.145) (0.134) potential 1.331∗∗ (0.509) R2 0.996 0.998 0.998 adj.R 2 0.996 0.997 0.998 N 39 39 39 Standard errors in parentheses ∗ ∗∗ ∗∗∗ (p ≤ 0.1), (p ≤ 0.05), (p ≤ 0.01) Table 1: LaTeX format output Ben Mazzotta (Fletcher School) Estout Demo August 24, 2010 11 / 11