SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Destaque (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
 

Semelhante a Estout demo

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
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson Method
Jigisha 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 MODEL
grssieee
 

Semelhante a 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
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

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