Package tonymisc. R topics documented: February 15, Title Functions for Econometrics Output. Version Date

Size: px
Start display at page:

Download "Package tonymisc. R topics documented: February 15, Title Functions for Econometrics Output. Version Date"

Transcription

1 Title Functions for Econometrics Output Version Date Author J. Anthony Cookson Package tonymisc February 15, 2013 Maintainer J. Anthony Cookson This package provides several methods and functions that simplify output from regression packages. Depends R (>= ), memisc, AER, car, nlme Suggests gmm, plm, Ecdat License GPL-2 Repository CRAN Date/Publication :00:48 NeedsCompilation no R topics documented: tonymisc-package AK getsummary.robust iv lagger laptop mfx mfx_me mktshare robust settabdefault summaryr

2 2 AK91 sum_iv tony.vars tony.vars Index 17 tonymisc-package Functions and Extensions for Econometrics Output Details This package contains a list of commands that make summarizing regression output simpler. Much of this package is an extension of the mtable() command in the memisc library, but there are a variety of other methods specifically, those for reporting robust standard errors and IV regression output that are available in this package. Package: tonymisc Type: Package Version: Date: License: GPL-2 Maintainer: J. Anthony Cookson <tony.cookson@gmail.com> ivreg mtable AK91 Angrist and Krueger (1991) s Compulsory Schooling Data (1970 Census Cohort Only) This data set is a reformatted version of Angrist and Krueger s compulsory schooling data. data(ak91)

3 AK91 3 Format A data frame with observations on the following 11 variables. age Age in years ageq Age in quarter-years educ Years of education lwklywge logged-weekly wage married indicator variable == 1 if married census 1970 census (left over from original data set). This is a constant ==70 qob Quarter of Birth, a factor with levels race an indicator variable == 1 if black smsa an indicator variable == 1 if center city yob Year of birth, a factor with levels Technically, there are other levels, but those don t occur within this subsample of Angrist and Krueger (1991) region Region of Residence, a factor with levels enocent esocent midatl mt neweng other soatl wnocent wsocent Source References Does Compulsory School Attendance Affect Schooling and Earnings? Joshua D. Angrist and Alan B. Krueger. The Quarterly Journal of Economics. Vol. 106, No. 4 (Nov., 1991), pp ## Reproduce the First Two Columns of Table IV, Angrist and Krueger (1991) ## Not Run. Takes ~ 15 seconds # library(tonymisc) # library(memisc) # data(ak91) # ak.lm1 = lm(lwklywge~yob+educ, data=ak91) # ak.iv1 = iv(lwklywge~yob+educ,educ~yob:qob, data=ak91) # settabdefault() # mtable(ak.lm1, ak.iv1)

4 4 getsummary.robust getsummary.robust getsummary Methods for Extending mtable() These functions are getsummary methods for extending the mtable() to report robust standard errors (.robust), IV regression estimates (.ivreg and.tonyiv), summary output from GLS fits (.gls), marginal effects for probit and logit (.mfx), and panel models output (.plm and.pgmm). The robust() command allows the user not only to specify the type of robust standard error correction, but also to specify the set of variables to be included in the summary output. ## S3 method for class robust getsummary(obj, alpha = 0.05,...) obj alpha An object of type that matches the method. These functions provide support for ivreg, plm, pgmm, gls and tonyiv objects as well as objects coerced to be of class "robust" and of class "mfx." Significance Level... passed to getsummary Returns a list of objects to be referenced by mtable. Do not use these methods directly. Use mtable, which will automatically call these methods for class objects that have been implemented. J. Anthony Cookson tolatex mtable robust settabdefault ## ## ## Example 1: Extensions for Robust ## ## ## library(tonymisc) data(mktshare) mkt.lm = lm(y~x1+x2+p+z1, data=mktshare)

5 getsummary.robust 5 mkt.rob = robust(mkt.lm) ## Default is hc3 heteroskedasticity corrrection mkt.rob2 = robust(mkt.lm, type = "hc1") ## Can specify hc0, hc1, hc2, hc3 mkt.rob3 = robust(mkt.lm, type = "no") ## Can specify type = "no" for not corrected SEs mtable(mkt.rob, mkt.rob2, mkt.rob3) ## Coding Kludge: no correction is reported as type = hc9 mkt.rob4= robust(mkt.lm, keep="p") ## keeps intercept by default mkt.rob5= robust(mkt.lm, keep=c("x1","p")) ## can keep more than one mkt.rob6= robust(mkt.lm, keep=c("x1", "p"), drop="(intercept)") ## Drop intercept. mtable(mkt.rob4, mkt.rob5, mkt.rob6) mkt.rob7= robust(mkt.lm, type="no", drop=c("x1","z1")) ## type="no": extends selective output to lm mkt.rob8= robust(mkt.lm, drop="(intercept)", keep=c("x1", "x2")) ## Can drop intercept and specify keep mtable(mkt.rob7, mkt.rob8) ## ## ## Example 2: Extensions for ivreg ## ## ## library(tonymisc) data(mktshare) mkt.aer mkt.aer2 = ivreg(y~x1+x2+p x1+x2+z1+z2,data=mktshare) = ivreg(y~x1+x2+p x1+z1+z2,data=mktshare) mtable(mkt.aer,mkt.aer2) ## ## ## Example 3: Extensions for gls ## ## ## library(tonymisc) data(mktshare) mkt.gls1 mkt.gls2 mkt.gls3 = gls(y~x1, data=mktshare,correlation=corar1(form=~1)) = gls(y~x1+x2, data=mktshare,correlation=corar1(form=~1)) = gls(y~x1, data=mktshare,correlation=corarma(p=2,q=2,form=~1)) mtable(mkt.aer,mkt.aer2) ## ## ## Example 4: Extensions for mfx ## ## Note: SEs are approximate ## ## ## library(tonymisc) library(ecdat) data(yogurt)

6 6 iv yop <- glm(i(choice=="yoplait")~price.yoplait+feat.yoplait, family=binomial, data=yogurt) yo_me <- mfx_me(yop) ## Create "mfx" object to trick mtable() mtable(yop, yo_me) ## produces a table with nice output tolatex(mtable(yop, yo_me)) ## Produces LaTeX code ## ## ## Example 5: Extensions for plm ## ## and pgmm ## ## ## library(tonymisc) library(plm) ## plm Example ## data("produc", package = "plm") zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, index = c("state","year")) mtable(zz) ## pgmm Example ## data("empluk", package = "plm") ## Arellano and Bond (1991), table 4b z1 <- pgmm(log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 0:1) + log(capital) + lag(log(output), 0:1) lag(log(emp), 2:99), data = EmplUK, effect = "twoways", model = "twosteps") mtable(z1) iv Another Two-Stage Least Squares Command This command performs 2SLS. Relative to other IV regression commands (like ivreg() in AER or tsls() in sem), this function automatically conducts a test for instrument relevance and provides easy access to the first stage regression estimates. iv(second, first, data) second first data A formula specifying the second stage regression. This should include all regressors (endogenous and exogenous). A formula statement specifying the first stage regression(s). The LHS of this formula is the set of endogenous regressors separated by + signs. The RHS of the formula contains the excluded instruments; the function automatically adds exogenous regressors to the RHS of the first st age. A data frame object.

7 iv 7 Details After creating an IV regression object with iv(), you have two options to produce output: (1) Apply mtable() to the iv object, (2) Apply sum_iv() to the iv object. The former method makes it slightly easier to port the results into TeX tables while the latter method behaves more like a summary command (and provides more detail). second first ftest cc sargan A summary.lm object that contains the second stage estimation results with the appropriately-adjusted standard errors A summary.lm object that contains the first stage of the IV regression An anova object containing the result of an F-test for instrument relevance in the IV regression First-stage test of relevance that can handle testing for relevance with multiple endogenous regressors. The null hypothesis of this test is that the minimum canonical correlation equals zero (see Anderson 2003). Sargan test for exogeneity of instruments. Returns NA if there are not more instruments than endogenous regressors. J. Anthony Cookson References T. W. Anderson (2003). An Introduction to Multivariate Statistical Analysis, Third Edition, Wiley. tsls, ivreg, mtable library(tonymisc) data(mktshare) ## Create the object ## myiv = iv(y~x1+x2+p, p~z1+z2, data=mktshare) sum_iv(myiv) mtable(myiv) ## Summarize Organically ## mtable() summary ## An example with multiple instruments ## myiv2 = iv(y~x1+x2+p, x2+p~z1+z2, data=mktshare) sum_iv(myiv2, cc=true) mtable(myiv, myiv2)

8 8 lagger lagger Lagger Function for Lagging Time Series data This command lags (or leads) variables within a data frame that contains variable named "date" that has class "Date". lagger(data, by.var, lag.vars, num.lags, direction, freq = "daily") data by.var lag.vars num.lags direction freq A data.frame object with a panel structure. character string with a unique identifier for each time period. character vector of variable names (must be defined within data) of variables to lag or lead. numeric vector that indicates the number of lags to generate for each variable within lag.vars. Specify "lag" or "lead" to indicate whether to generate lags or leads. Specify "daily", "monthly" or "quartly" to indicate the frequency of the data. The function returns a data frame with new columns for the lags and leads generated. Sean Golden and Ian Muir (with adaptations by J. Anthony Cookson) as.date,date

9 laptop 9 laptop Laptop Data / Observational Format Details Source This is an example data set from an online price comparison website on laptop prices. I selected the top 10 brands according to the website and I extracted the first 20 prices in the list sorted by "relevance." data(laptop) A data frame with 200 observations on the following 3 variables. Brand a factor with levels Acer Apple ASUS Dell HP Lenovo MSI Panasonic Sony Toshiba Product a numeric vector indicating the position in the search by "relevance." Price a numeric vector indicating the price in US dollars for the laptop computer. This data set is a convenience sample of laptop prices. It should not be used for any purpose other than demonstrating methods and trying out functions in R. data(laptop) ## maybe str(laptop) ; plot(laptop)... mfx A Marginal Effects Post Estimation Command for glm This function returns Stata-like probit and logit marginal effects when applied to a glm object that was created using a probit or logit binomial link function. This function and its S3 print method are for printing summary()-like output to the screen as one might do in interactive mode. If you wish to port marginal effects output to a LaTeX table, use mfx_me to coerce the glm object to "mfx" and then apply mtable() directly.

10 10 mfx_me mfx(x) x A.glm fitted object created using a binomial family with a probit or logit link function. Returns a standard glm list (see glm for details), but with marginal effects in place of ecoefficients and an object of class "mfx." J. Anthony Cookson (adaptation of code from a blog post by TimeSeriesIreland) mfx_me glm getsummary.mfx library(ecdat) data(yogurt) yop <- glm(i(choice=="yoplait")~price.yoplait+feat.yoplait, family=binomial, data=yogurt) yo_mfx <-mfx(yop) ## Creates "mfx" object yo_mfx ## Calls print.mfx to print to screen ## Alternative Method to use with mtable() ## # yo_me <- mfx_me(yop) ## Create "mfx" object to trick mtable() # mtable(yop, yo_me) ## produces a table with nice output mfx_me Marginal Effects This function coerces glm objects to type mfx. mfx_me(x)

11 mktshare 11 x A glm object using binomial link function probit or logit. The getsummary.mfx method doesn t know what to do with other types of glm objects. Returns an object of type "mfx." J. Anthony Cookson getsummary.mfx mtable library(tonymisc) library(ecdat) data(yogurt) yop <- glm(i(choice=="yoplait")~price.yoplait+feat.yoplait, family=binomial, data=yogurt) yo_me <- mfx_me(yop) ## Create "mfx" object to trick mtable() mtable(yop, yo_me) ## produces a table with nice output tolatex(mtable(yop, yo_me)) ## Produces LaTeX code mktshare Synthetic Market Share Data Format This data set is a synthetic data set generated from a random utility model with linear preferences for attributes of a product. data(mktshare) A data frame with 100 observations on the following 10 variables. product a numeric vector whose values indicate the product number within market market a numeric vector whose values indicate the market number (should be a factor) y a numeric vector equal to the log(share/outshare) to be used as the response variable (as suggested by Berry 1994).

12 12 robust share a numeric vector equal to the market share that product i has in market m. outshare a numeric vector equal to the fraction of the individuals who buy the outside good. x1 a numeric vector whose values represent attribute one. x2 a numeric vector whose values represent attribute two. p a numeric vector whose values represent the product s price. z1 a numeric vector that is a potential instrument z2 a numeric vector that is another potential instrument Details This is a simulated data set that I use to show how to estimate IV regression. data(mktshare) robust Robust Objects / Selective Variable Reporting for mtable() This function coerces lm objects to type robust and allows the user to specify the type of heteroskedasticity correction. The function is intended to be used with summaryr to interface with mtable() to produce nicely-formatted output. robust(model, type = "hc3", keep=null, drop=null, vcov=null, se = NULL) model type keep drop vcov se A linear models object. The type of heteroskedasticity correction you want to specify. Options include "no", "hc0", "hc1", "hc2", "hc3" and "hc4" with "hc3" as the default. For more information on these corrections see the help file for hccm. A user would specify "no" to selectively display output from a lm() fit using mtable(). A vector of variable names you would like to display using mtable(). Defaults to NULL. A vector of variable names you would like to not display using mtable(). Defaults to NULL. If both keep and drop are NULL, the default is to print output for all variables in the model. If keep and drop are specified, keep takes precedence, except in the case of dropping an intercept. See examples below. User-supplied variance-covariance matrix. User-supplied vector of standard errors.

13 settabdefault 13 Returns an object of type "robust." J. Anthony Cookson hccm summaryr getsummary.robust mtable library(tonymisc) data(mktshare) mkt.lm = lm(y~x1+x2+p+z1, data=mktshare) mkt.rob = robust(mkt.lm) ## Default is hc3 heteroskedasticity corrrection mkt.rob2 = robust(mkt.lm, type = "hc1") ## Can specify hc0, hc1, hc2, hc3 mkt.rob3 = robust(mkt.lm, type = "no") ## Can specify type = "no" for not corrected SEs mtable(mkt.rob, mkt.rob2, mkt.rob3) ## Coding Kludge: no correction is reported as type = hc9 mkt.rob4= robust(mkt.lm, keep="p") ## keeps intercept by default mkt.rob5= robust(mkt.lm, keep=c("x1","p")) ## can keep more than one mkt.rob6= robust(mkt.lm, keep=c("x1", "p"), drop="(intercept)") ## Drop intercept. mtable(mkt.rob4, mkt.rob5, mkt.rob6) mkt.rob7= robust(mkt.lm, type="no", drop=c("x1","z1")) ## type="no": extends selective output to lm mkt.rob8= robust(mkt.lm, drop="(intercept)", keep=c("x1", "x2")) ## Can drop intercept and specify keep mtable(mkt.rob7, mkt.rob8) settabdefault Setting Summary Defaults for Extending mtable() This function resets the summary template for mtable() as opposed to using the setsummarytemplate() command directly. It is called directly from within each getsummary method in tonymisc. settabdefault()

14 14 summaryr J. Anthony Cookson mtable gls ivreg summaryr Summary Function for Robust Standard Errors This function allows the user to summarize regression output using heteroskedasticity-consistent standard errors. The function is just an adaptation of summaryhccm.lm written by John Fox, but some details have been changed to allow the function to interface with mtable through getsummary.robust. summaryr(model, type = c("hc3", "hc2", "hc1", "hc0", "hc4"),...) model type... A linear models object. The type of heteroskedasticity correction you want to specify. Options include hc0, hc1, hc2, hc3 and hc4. The default is hc3. For more information on these corrections see the help file for hccm. The function returns a linear models object with heteroskedasticity-consistent standard errors. J. Anthony Cookson (adapted the code from John Fox) hccm linearhypothesis data(mktshare) ## Synthetic Market Share Data mkt.lm = lm(y~x1+x2, data=mktshare) summary(mkt.lm) ## For comparison summaryr(mkt.lm) ## For demonstration (SEs are slightly different)

15 sum_iv 15 sum_iv Summary Printing Command for iv() objects This command is the equivalent of a summary command for IV regression objects created using iv() from the tonymisc library. sum_iv(reg_iv, first = FALSE, ftest = FALSE, second = TRUE, cc = FALSE, sargan = FALSE) reg_iv first ftest second cc sargan A iv()-created IV regression object. If TRUE, display the first stage regression output. Default FALSE. If TRUE, display the F-test for relevance. Default FALSE. If TRUE, display the second-stage regression output. Default TRUE. If TRUE, display the Anderson (2003) Canonical Correlation test for first-stage relevance. Default FALSE. If TRUE, display the Sargan test for instrument exogeneity. Default FALSE. The method just prints output to the screen. J. Anthony Cookson iv,mtable data(mktshare) myiv = iv(y~x1+x2+p, p~z1+z2, data=mktshare) sum_iv(myiv) sum_iv(myiv, ftest=true) sum_iv(myiv, ftest=true, first=true) sum_iv(myiv, ftest=true, first=true, cc=true) myiv = iv(y~x1+x2+p, x2+p~z1+z2, data=mktshare) sum_iv(myiv) sum_iv(myiv, ftest=true) sum_iv(myiv, ftest=true, first=true) sum_iv(myiv, ftest=true, first=true, cc=true)

16 16 tony.vars2 tony.vars An alternative all.vars() command This is a utility command used by iv() that provides a slightly easier-to-use version of all.vars() when the formula statement contains transformations using I(). tony.vars(x) x The only argument is a formula statement. Returns a list of variable names. J. Anthony Cookson tony.vars2 Another alternative all.vars() command This is a utility command used by iv() that provides a slightly easier-to-use version of all.vars() when the formula statement contains transformations using I(). It also makes it possible to specify/extract multiple LHS variables in the first stage. tony.vars2(x) x The only argument is a formula statement. Returns a list of variable names. J. Anthony Cookson

17 Index Topic datasets AK91, 2 laptop, 9 mktshare, 11 Topic package tonymisc-package, 2 AK91, 2 as.date, 8 Date, 8 settabdefault, 4, 13 sum_iv, 15 summaryr, 13, 14 tolatex, 4 tony.vars, 16 tony.vars2, 16 tonymisc (tonymisc-package), 2 tonymisc-package, 2 tsls, 7 getsummary.coeftest (getsummary.robust), 4 getsummary.gls (getsummary.robust), 4 getsummary.ivreg (getsummary.robust), 4 getsummary.mfx, 10, 11 getsummary.mfx (getsummary.robust), 4 getsummary.pgmm (getsummary.robust), 4 getsummary.plm (getsummary.robust), 4 getsummary.robust, 4, 13 getsummary.tonyiv (getsummary.robust), 4 glm, 10 gls, 14 hccm, 13, 14 iv, 6, 15 ivreg, 2, 7, 14 lagger, 8 laptop, 9 linearhypothesis, 14 mfx, 9 mfx_me, 9, 10, 10 mktshare, 11 mtable, 2, 4, 7, 11, print.mfx (mfx), 9 robust, 4, 12 17

Package nearfar. June 3, 2017

Package nearfar. June 3, 2017 Type Package Title Near-Far Matching Version 1.1 Date 2017-06-01 Package nearfar June 3, 2017 Author Joseph Rigdon, Michael Baiocchi, Sanjay Basu Maintainer Near-far matching is a study design technique

More information

Package rdd. March 14, 2016

Package rdd. March 14, 2016 Maintainer Drew Dimmery Author Drew Dimmery Version 0.57 License Apache License (== 2.0) Title Regression Discontinuity Estimation Package rdd March 14, 2016 Provides the tools to undertake

More information

Package StVAR. February 11, 2017

Package StVAR. February 11, 2017 Type Package Title Student's t Vector Autoregression (StVAR) Version 1.1 Date 2017-02-10 Author Niraj Poudyal Maintainer Niraj Poudyal Package StVAR February 11, 2017 Description Estimation

More information

Package modmarg. R topics documented:

Package modmarg. R topics documented: Package modmarg February 1, 2018 Title Calculating Marginal Effects and Levels with Errors Version 0.9.2 Calculate predicted levels and marginal effects, using the delta method to calculate standard errors.

More information

Package endogenous. October 29, 2016

Package endogenous. October 29, 2016 Package endogenous October 29, 2016 Type Package Title Classical Simultaneous Equation Models Version 1.0 Date 2016-10-25 Maintainer Andrew J. Spieker Description Likelihood-based

More information

schooling.log 7/5/2006

schooling.log 7/5/2006 ----------------------------------- log: C:\dnb\schooling.log log type: text opened on: 5 Jul 2006, 09:03:57. /* schooling.log */ > use schooling;. gen age2=age76^2;. /* OLS (inconsistent) */ > reg lwage76

More information

Package oaxaca. January 3, Index 11

Package oaxaca. January 3, Index 11 Type Package Title Blinder-Oaxaca Decomposition Version 0.1.4 Date 2018-01-01 Package oaxaca January 3, 2018 Author Marek Hlavac Maintainer Marek Hlavac

More information

Package MatchIt. April 18, 2017

Package MatchIt. April 18, 2017 Version 3.0.1 Date 2017-04-18 Package MatchIt April 18, 2017 Title Nonparametric Preprocessing for Parametric Casual Inference Selects matched samples of the original treated and control groups with similar

More information

Package REndo. November 8, 2017

Package REndo. November 8, 2017 Type Package Package REndo November 8, 2017 Title Fitting Linear Models with Endogenous Regressors using Latent Instrumental Variables Version 1.3 Date 2017-11-08 Author Raluca Gui, Markus Meierer, Rene

More information

Introduction to Mixed Models: Multivariate Regression

Introduction to Mixed Models: Multivariate Regression Introduction to Mixed Models: Multivariate Regression EPSY 905: Multivariate Analysis Spring 2016 Lecture #9 March 30, 2016 EPSY 905: Multivariate Regression via Path Analysis Today s Lecture Multivariate

More information

Package gee. June 29, 2015

Package gee. June 29, 2015 Title Generalized Estimation Equation Solver Version 4.13-19 Depends stats Suggests MASS Date 2015-06-29 DateNote Gee version 1998-01-27 Package gee June 29, 2015 Author Vincent J Carey. Ported to R by

More information

Instrumental Variable Regression

Instrumental Variable Regression Instrumental Variable Regression Erik Gahner Larsen Advanced applied statistics, 2015 1 / 58 Agenda Instrumental variable (IV) regression IV and LATE IV and regressions IV in STATA and R 2 / 58 IV between

More information

Package intreg. R topics documented: February 15, Version Date Title Interval Regression

Package intreg. R topics documented: February 15, Version Date Title Interval Regression Package intreg February 15, 2013 Version 0.1-2 Date 2012-01-12 Title Interval Regression Author Ott Toomet Maintainer Ott Toomet Depends R (>= 2.7.0), maxlik (>=

More information

Package mvprobit. November 2, 2015

Package mvprobit. November 2, 2015 Version 0.1-8 Date 2015-11-02 Title Multivariate Probit Models Package mvprobit November 2, 2015 Author Arne Henningsen Maintainer Arne Henningsen

More information

RUDIMENTS OF STATA. After entering this command the data file WAGE1.DTA is loaded into memory.

RUDIMENTS OF STATA. After entering this command the data file WAGE1.DTA is loaded into memory. J.M. Wooldridge Michigan State University RUDIMENTS OF STATA This handout covers the most often encountered Stata commands. It is not comprehensive, but the summary will allow you to do basic data management

More information

Package misclassglm. September 3, 2016

Package misclassglm. September 3, 2016 Type Package Package misclassglm September 3, 2016 Title Computation of Generalized Linear Models with Misclassified Covariates Using Side Information Version 0.2.0 Date 2016-09-02 Author Stephan Dlugosz

More information

Package JGEE. November 18, 2015

Package JGEE. November 18, 2015 Type Package Package JGEE November 18, 2015 Title Joint Generalized Estimating Equation Solver Version 1.1 Date 2015-11-17 Author Gul Inan Maintainer Gul Inan Fits two different joint

More information

Package bife. May 7, 2017

Package bife. May 7, 2017 Type Package Title Binary Choice Models with Fixed Effects Version 0.4 Date 2017-05-06 Package May 7, 2017 Estimates fixed effects binary choice models (logit and probit) with potentially many individual

More information

Health Disparities (HD): It s just about comparing two groups

Health Disparities (HD): It s just about comparing two groups A review of modern methods of estimating the size of health disparities May 24, 2017 Emil Coman 1 Helen Wu 2 1 UConn Health Disparities Institute, 2 UConn Health Modern Modeling conference, May 22-24,

More information

Package robustreg. R topics documented: April 27, Version Date Title Robust Regression Functions

Package robustreg. R topics documented: April 27, Version Date Title Robust Regression Functions Version 0.1-10 Date 2017-04-25 Title Robust Regression Functions Package robustreg April 27, 2017 Author Ian M. Johnson Maintainer Ian M. Johnson Depends

More information

Package quickreg. R topics documented:

Package quickreg. R topics documented: Package quickreg September 28, 2017 Title Build Regression Models Quickly and Display the Results Using 'ggplot2' Version 1.5.0 A set of functions to extract results from regression models and plot the

More information

Package sfadv. June 19, 2017

Package sfadv. June 19, 2017 Version 1.0.1 Date 2017-06-19 Package sfadv June 19, 2017 Title Advanced Methods for Stochastic Frontier Analysis Maintainer Yann Desjeux Description Stochastic frontier analysis

More information

Package sphet. March 16, 2018

Package sphet. March 16, 2018 Version 1.7 Date 2018-03-16 Package sphet March 16, 2018 Title Estimation of Spatial Autoregressive Models with and without Heteroscedasticity Author Maintainer Depends R (>= 3.0.1) Imports nlme, spdep

More information

Goals of this course. Crash Course in R. Getting Started with R. What is R? What is R? Getting you setup to use R under Windows

Goals of this course. Crash Course in R. Getting Started with R. What is R? What is R? Getting you setup to use R under Windows Oxford Spring School, April 2013 Effective Presentation ti Monday morning lecture: Crash Course in R Robert Andersen Department of Sociology University of Toronto And Dave Armstrong Department of Political

More information

Package PSTR. September 25, 2017

Package PSTR. September 25, 2017 Type Package Package PSTR September 25, 2017 Title Panel Smooth Transition Regression Modelling Version 1.1.0 Provides the Panel Smooth Transition Regression (PSTR) modelling. The modelling procedure consists

More information

Package rbounds. February 20, 2015

Package rbounds. February 20, 2015 Version 2.1 Package rbounds February 20, 2015 Title Perform Rosenbaum bounds sensitivity tests for matched and unmatched data. Date 2014-12-7 Author Luke J. Keele Maintainer Luke J. Keele

More information

Package DSBayes. February 19, 2015

Package DSBayes. February 19, 2015 Type Package Title Bayesian subgroup analysis in clinical trials Version 1.1 Date 2013-12-28 Copyright Ravi Varadhan Package DSBayes February 19, 2015 URL http: //www.jhsph.edu/agingandhealth/people/faculty_personal_pages/varadhan.html

More information

Economics 561: Economics of Labour (Industrial Relations) Empirical Assignment #2 Due Date: March 7th

Economics 561: Economics of Labour (Industrial Relations) Empirical Assignment #2 Due Date: March 7th Page 1 of 5 2/16/2017 The University of British Columbia Vancouver School of Economics Economics 561: Economics of Labour (Industrial Relations) Professor Nicole M. Fortin Winter 2017 Professor Thomas

More information

Refactoring the xtable Package

Refactoring the xtable Package David J Scott 1 Daniel Geals 1 Paul Murrell 1 1 Department of Statistics, The University of Auckland July 10, 2015 Outline 1 Introduction 2 Analysis 3 Testing Outline 1 Introduction 2 Analysis 3 Testing

More information

Package glmnetutils. August 1, 2017

Package glmnetutils. August 1, 2017 Type Package Version 1.1 Title Utilities for 'Glmnet' Package glmnetutils August 1, 2017 Description Provides a formula interface for the 'glmnet' package for elasticnet regression, a method for cross-validating

More information

Package flexcwm. May 20, 2018

Package flexcwm. May 20, 2018 Type Package Title Flexible Cluster-Weighted Modeling Version 1.8 Date 2018-05-20 Author Mazza A., Punzo A., Ingrassia S. Maintainer Angelo Mazza Package flexcwm May 20, 2018 Description

More information

Package reghelper. April 8, 2017

Package reghelper. April 8, 2017 Type Package Title Helper Functions for Regression Analysis Version 0.3.3 Date 2017-04-07 Package reghelper April 8, 2017 A set of functions used to automate commonly used methods in regression analysis.

More information

Package glmmml. R topics documented: March 25, Encoding UTF-8 Version Date Title Generalized Linear Models with Clustering

Package glmmml. R topics documented: March 25, Encoding UTF-8 Version Date Title Generalized Linear Models with Clustering Encoding UTF-8 Version 1.0.3 Date 2018-03-25 Title Generalized Linear Models with Clustering Package glmmml March 25, 2018 Binomial and Poisson regression for clustered data, fixed and random effects with

More information

Package nricens. R topics documented: May 30, Type Package

Package nricens. R topics documented: May 30, Type Package Type Package Package nricens May 30, 2018 Title NRI for Risk Prediction Models with Time to Event and Binary Response Data Version 1.6 Date 2018-5-30 Author Eisuke Inoue Depends survival Maintainer Eisuke

More information

Package SAMUR. March 27, 2015

Package SAMUR. March 27, 2015 Type Package Package SAMUR March 27, 2015 Title Stochastic Augmentation of Matched Data Using Restriction Methods Version 0.6 Date 2015-03-26 Author Mansour T.A. Sharabiani, Alireza S. Mahani Maintainer

More information

Labor Economics with STATA. Estimating the Human Capital Model Using Artificial Data

Labor Economics with STATA. Estimating the Human Capital Model Using Artificial Data Labor Economics with STATA Liyousew G. Borga December 2, 2015 Estimating the Human Capital Model Using Artificial Data Liyou Borga Labor Economics with STATA December 2, 2015 84 / 105 Outline 1 The Human

More information

Introduction to Stata. Getting Started. This is the simple command syntax in Stata and more conditions can be added as shown in the examples.

Introduction to Stata. Getting Started. This is the simple command syntax in Stata and more conditions can be added as shown in the examples. Getting Started Command Syntax command varlist, option This is the simple command syntax in Stata and more conditions can be added as shown in the examples. Preamble mkdir tutorial /* to create a new directory,

More information

set mem 10m we can also decide to have the more separation line on the screen or not when the software displays results: set more on set more off

set mem 10m we can also decide to have the more separation line on the screen or not when the software displays results: set more on set more off Setting up Stata We are going to allocate 10 megabites to the dataset. You do not want to allocate to much memory to the dataset because the more memory you allocate to the dataset, the less memory will

More information

Package mreg. February 20, 2015

Package mreg. February 20, 2015 Package mreg February 20, 2015 Type Package Title Fits regression models when the outcome is partially missing. Version 1.1 Date 2007-06-24 Author Simon Bond Maintainer Simon Bond

More information

Stata Training. AGRODEP Technical Note 08. April Manuel Barron and Pia Basurto

Stata Training. AGRODEP Technical Note 08. April Manuel Barron and Pia Basurto AGRODEP Technical Note 08 April 2013 Stata Training Manuel Barron and Pia Basurto AGRODEP Technical Notes are designed to document state-of-the-art tools and methods. They are circulated in order to help

More information

Package lcc. November 16, 2018

Package lcc. November 16, 2018 Type Package Title Longitudinal Concordance Correlation Version 1.0 Author Thiago de Paula Oliveira [aut, cre], Rafael de Andrade Moral [aut], John Hinde [aut], Silvio Sandoval Zocchi [aut, ctb], Clarice

More information

Package rfsa. R topics documented: January 10, Type Package

Package rfsa. R topics documented: January 10, Type Package Type Package Package rfsa January 10, 2018 Title Feasible Solution Algorithm for Finding Best Subsets and Interactions Version 0.9.1 Date 2017-12-21 Assists in statistical model building to find optimal

More information

A First Tutorial in Stata

A First Tutorial in Stata A First Tutorial in Stata Stan Hurn Queensland University of Technology National Centre for Econometric Research www.ncer.edu.au Stan Hurn (NCER) Stata Tutorial 1 / 66 Table of contents 1 Preliminaries

More information

Package truncreg. R topics documented: August 3, 2016

Package truncreg. R topics documented: August 3, 2016 Package truncreg August 3, 2016 Version 0.2-4 Date 2016-08-03 Title Truncated Gaussian Regression Models Depends R (>= 1.8.0), maxlik Suggests survival Description Estimation of models for truncated Gaussian

More information

Package acebayes. R topics documented: November 21, Type Package

Package acebayes. R topics documented: November 21, Type Package Type Package Package acebayes November 21, 2018 Title Optimal Bayesian Experimental Design using the ACE Algorithm Version 1.5.2 Date 2018-11-21 Author Antony M. Overstall, David C. Woods & Maria Adamou

More information

Package CausalImpact

Package CausalImpact Package CausalImpact September 15, 2017 Title Inferring Causal Effects using Bayesian Structural Time-Series Models Date 2017-08-16 Author Kay H. Brodersen , Alain Hauser

More information

Package palmtree. January 16, 2018

Package palmtree. January 16, 2018 Package palmtree January 16, 2018 Title Partially Additive (Generalized) Linear Model Trees Date 2018-01-15 Version 0.9-0 Description This is an implementation of model-based trees with global model parameters

More information

Package GFD. January 4, 2018

Package GFD. January 4, 2018 Type Package Title Tests for General Factorial Designs Version 0.2.5 Date 2018-01-04 Package GFD January 4, 2018 Author Sarah Friedrich, Frank Konietschke, Markus Pauly Maintainer Sarah Friedrich

More information

Package addhaz. September 26, 2018

Package addhaz. September 26, 2018 Package addhaz September 26, 2018 Title Binomial and Multinomial Additive Hazard Models Version 0.5 Description Functions to fit the binomial and multinomial additive hazard models and to estimate the

More information

Package swcrtdesign. February 12, 2018

Package swcrtdesign. February 12, 2018 Package swcrtdesign February 12, 2018 Type Package Title Stepped Wedge Cluster Randomized Trial (SW CRT) Design Version 2.2 Date 2018-2-4 Maintainer Jim Hughes Author Jim Hughes and Navneet

More information

Package pnmtrem. February 20, Index 9

Package pnmtrem. February 20, Index 9 Type Package Package pnmtrem February 20, 2015 Title Probit-Normal Marginalized Transition Random Effects Models Version 1.3 Date 2013-05-19 Author Ozgur Asar, Ozlem Ilk Depends MASS Maintainer Ozgur Asar

More information

Package estprod. May 2, 2018

Package estprod. May 2, 2018 Title Estimation of Production Functions Version 1.1 Date 2018-05-01 Package estprod May 2, 2018 Estimation of production functions by the Olley-Pakes, Levinsohn- Petrin and Wooldrge methodologies. The

More information

Package CMatching. R topics documented:

Package CMatching. R topics documented: Package CMatching October 5, 2018 Title Matching Algorithms for Causal Inference with Clustered Data Version 2.2.1 Date 2018-10-05 Author Massimo Cannas [aut, cre], Bruno Arpino [ctb], Elena Colicino [ctb]

More information

Package oglmx. R topics documented: May 5, Type Package

Package oglmx. R topics documented: May 5, Type Package Type Package Package oglmx May 5, 2018 Title Estimation of Ordered Generalized Linear Models Version 3.0.0.0 Date 2018-05-05 Author Nathan Carroll Maintainer Nathan Carroll Ordered

More information

Package tpr. R topics documented: February 20, Type Package. Title Temporal Process Regression. Version

Package tpr. R topics documented: February 20, Type Package. Title Temporal Process Regression. Version Package tpr February 20, 2015 Type Package Title Temporal Process Regression Version 0.3-1 Date 2010-04-11 Author Jun Yan Maintainer Jun Yan Regression models

More information

GETTING STARTED WITH STATA. Sébastien Fontenay ECON - IRES

GETTING STARTED WITH STATA. Sébastien Fontenay ECON - IRES GETTING STARTED WITH STATA Sébastien Fontenay ECON - IRES THE SOFTWARE Software developed in 1985 by StataCorp Functionalities Data management Statistical analysis Graphics Using Stata at UCL Computer

More information

Two-Stage Least Squares

Two-Stage Least Squares Chapter 316 Two-Stage Least Squares Introduction This procedure calculates the two-stage least squares (2SLS) estimate. This method is used fit models that include instrumental variables. 2SLS includes

More information

An Introduction to Stata Part II: Data Analysis

An Introduction to Stata Part II: Data Analysis An Introduction to Stata Part II: Data Analysis Kerry L. Papps 1. Overview Do-files Sorting a dataset Combining datasets Creating a dataset of means or medians etc. Weights Panel data capabilities Dummy

More information

Package piecewisesem

Package piecewisesem Type Package Title Piecewise Structural Equation Modeling Version 1.2.1 Date 2016-12-06 Author Package piecewisesem Maintainer December 8, 2016 Implements piecewise structural equation

More information

Package corclass. R topics documented: January 20, 2016

Package corclass. R topics documented: January 20, 2016 Package corclass January 20, 2016 Type Package Title Correlational Class Analysis Version 0.1.1 Date 2016-01-14 Author Andrei Boutyline Maintainer Andrei Boutyline Perform

More information

Package mnlogit. November 8, 2016

Package mnlogit. November 8, 2016 Package mnlogit November 8, 2016 Type Package Title Multinomial Logit Model Version 1.2.5 Date 2016-11-6 Suggests VGAM, nnet Imports mlogit, lmtest, Formula, stats Author Asad Hasan, Wang Zhiyu, Alireza

More information

Package datasets.load

Package datasets.load Title Interface for Loading Datasets Version 0.1.0 Package datasets.load December 14, 2016 Visual interface for loading datasets in RStudio from insted (unloaded) s. Depends R (>= 3.0.0) Imports shiny,

More information

Package tukeytrend. June 20, 2017

Package tukeytrend. June 20, 2017 Type Package Version 0.4 Package tukeytrend June 20, 2017 Title Tukeys Trend Test via Multiple Marginal Models Date 2017-06-20 Author Frank Schaarschmidt [aut, cre], Christian Ritz [aut], Ludwig Hothorn

More information

Package MSwM. R topics documented: February 19, Type Package Title Fitting Markov Switching Models Version 1.

Package MSwM. R topics documented: February 19, Type Package Title Fitting Markov Switching Models Version 1. Type Package Title Fitting Markov Switching Models Version 1.2 Date 2014-02-05 Package MSwM February 19, 2015 Author Josep A. Sanchez-Espigares, Alberto Lopez-Moreno Maintainer Josep A. Sanchez-Espigares

More information

Package mfbvar. December 28, Type Package Title Mixed-Frequency Bayesian VAR Models Version Date

Package mfbvar. December 28, Type Package Title Mixed-Frequency Bayesian VAR Models Version Date Type Package Title Mied-Frequency Bayesian VAR Models Version 0.4.0 Date 2018-12-17 Package mfbvar December 28, 2018 Estimation of mied-frequency Bayesian vector autoregressive (VAR) models with Minnesota

More information

PRI Workshop Introduction to AMOS

PRI Workshop Introduction to AMOS PRI Workshop Introduction to AMOS Krissy Zeiser Pennsylvania State University klz24@pop.psu.edu 2-pm /3/2008 Setting up the Dataset Missing values should be recoded in another program (preferably with

More information

Package intccr. September 12, 2017

Package intccr. September 12, 2017 Type Package Package intccr September 12, 2017 Title Semiparametric Competing Risks Regression under Interval Censoring Version 0.2.0 Author Giorgos Bakoyannis , Jun Park

More information

Introduction to the R Statistical Computing Environment R Programming: Exercises

Introduction to the R Statistical Computing Environment R Programming: Exercises Introduction to the R Statistical Computing Environment R Programming: Exercises John Fox (McMaster University) ICPSR 2014 1. A straightforward problem: Write an R function for linear least-squares regression.

More information

Package midastouch. February 7, 2016

Package midastouch. February 7, 2016 Type Package Version 1.3 Package midastouch February 7, 2016 Title Multiple Imputation by Distance Aided Donor Selection Date 2016-02-06 Maintainer Philipp Gaffert Depends R (>=

More information

Introduction to STATA 6.0 ECONOMICS 626

Introduction to STATA 6.0 ECONOMICS 626 Introduction to STATA 6.0 ECONOMICS 626 Bill Evans Fall 2001 This handout gives a very brief introduction to STATA 6.0 on the Economics Department Network. In a few short years, STATA has become one of

More information

Package labelled. December 19, 2017

Package labelled. December 19, 2017 Package labelled December 19, 2017 Type Package Title Manipulating Labelled Data Version 1.0.1 Date 2017-12-19 Maintainer Joseph Larmarange Work with labelled data imported from

More information

Using SAS and STATA in Archival Accounting Research

Using SAS and STATA in Archival Accounting Research Using SAS and STATA in Archival Accounting Research Kai Chen Dec 2, 2014 Overview SAS and STATA are most commonly used software in archival accounting research. SAS is harder to learn. STATA is much easier.

More information

Package FMsmsnReg. March 30, 2016

Package FMsmsnReg. March 30, 2016 Package FMsmsnReg March 30, 2016 Type Package Title Regression Models with Finite Mixtures of Skew Heavy-Tailed Errors Version 1.0 Date 2016-03-29 Author Luis Benites Sanchez and Rocio Paola Maehara and

More information

Package OLScurve. August 29, 2016

Package OLScurve. August 29, 2016 Type Package Title OLS growth curve trajectories Version 0.2.0 Date 2014-02-20 Package OLScurve August 29, 2016 Maintainer Provides tools for more easily organizing and plotting individual ordinary least

More information

Package lsmeans. February 15, 2013

Package lsmeans. February 15, 2013 Type Package Title Least-squares means Version 1.06-05 Date 2013-02-13 Encoding latin1 Author Russell V. Lenth Package lsmeans February 15, 2013 Maintainer Russ Lenth Suggests

More information

Package gplm. August 29, 2016

Package gplm. August 29, 2016 Type Package Title Generalized Partial Linear Models (GPLM) Version 0.7-4 Date 2016-08-28 Author Package gplm August 29, 2016 Maintainer Provides functions for estimating a generalized

More information

Package optimus. March 24, 2017

Package optimus. March 24, 2017 Type Package Package optimus March 24, 2017 Title Model Based Diagnostics for Multivariate Cluster Analysis Version 0.1.0 Date 2017-03-24 Maintainer Mitchell Lyons Description

More information

BIOL 458 BIOMETRY Lab 10 - Multiple Regression

BIOL 458 BIOMETRY Lab 10 - Multiple Regression BIOL 458 BIOMETRY Lab 0 - Multiple Regression Many problems in biology science involve the analysis of multivariate data sets. For data sets in which there is a single continuous dependent variable, but

More information

Package svapls. February 20, 2015

Package svapls. February 20, 2015 Package svapls February 20, 2015 Type Package Title Surrogate variable analysis using partial least squares in a gene expression study. Version 1.4 Date 2013-09-19 Author Sutirtha Chakraborty, Somnath

More information

Package distdichor. R topics documented: September 24, Type Package

Package distdichor. R topics documented: September 24, Type Package Type Package Package distdichor September 24, 2018 Title Distributional Method for the Dichotomisation of Continuous Outcomes Version 0.1-1 Author Odile Sauzet Maintainer Odile Sauzet

More information

Package simr. April 30, 2018

Package simr. April 30, 2018 Type Package Package simr April 30, 2018 Title Power Analysis for Generalised Linear Mixed Models by Simulation Calculate power for generalised linear mixed models, using simulation. Designed to work with

More information

Package UNF. June 13, 2017

Package UNF. June 13, 2017 Version 2.0.6 Package UNF June 13, 2017 Title Tools for Creating Universal Numeric Fingerprints for Data Date 2017-06-13 Description Computes a universal numeric fingerprint (UNF) for an R data object.

More information

Package GLMMRR. August 9, 2016

Package GLMMRR. August 9, 2016 Type Package Package GLMMRR August 9, 2016 Title Generalized Linear Mixed Model (GLMM) for Binary Randomized Response Data Version 0.2.0 Date 2016-08-08 Author Jean-Paul Fox [aut], Konrad Klotzke [aut],

More information

Package spregime. March 12, 2012

Package spregime. March 12, 2012 Title Tools for Spatial Regime Analysis Version 0.3.0 Date 2012-03-12 Author Maintainer Package spregime March 12, 2012 A set of tools designed test to test for spatial heterogeneity characterized by groupwise

More information

Package DTRreg. August 30, 2017

Package DTRreg. August 30, 2017 Package DTRreg August 30, 2017 Type Package Title DTR Estimation and Inference via G-Estimation, Dynamic WOLS, and Q-Learning Version 1.3 Date 2017-08-30 Author Michael Wallace, Erica E M Moodie, David

More information

Notes for Student Version of Soritec

Notes for Student Version of Soritec Notes for Student Version of Soritec Department of Economics January 20, 2001 INSTRUCTIONS FOR USING SORITEC This is a brief introduction to the use of the student version of the Soritec statistical/econometric

More information

Package influence.sem

Package influence.sem Type Package Package influence.sem April 14, 2018 Title Case Influence in Structural Equation Models Version 2.2 Date 2018-04-14 Author Massimiliano Pastore & Gianmarco Altoe' Depends lavaan Suggests tcltk

More information

Package mtsdi. January 23, 2018

Package mtsdi. January 23, 2018 Version 0.3.5 Date 2018-01-02 Package mtsdi January 23, 2018 Author Washington Junger and Antonio Ponce de Leon Maintainer Washington Junger

More information

Basic Stata Tutorial

Basic Stata Tutorial Basic Stata Tutorial By Brandon Heck Downloading Stata To obtain Stata, select your country of residence and click Go. Then, assuming you are a student, click New Educational then click Students. The capacity

More information

Package MOST. November 9, 2017

Package MOST. November 9, 2017 Type Package Title Multiphase Optimization Strategy Version 0.1.0 Depends R (>= 2.15.0) Copyright The Pennsylvania State University Package MOST November 9, 2017 Description Provides functions similar

More information

Package PrivateLR. March 20, 2018

Package PrivateLR. March 20, 2018 Type Package Package PrivateLR March 20, 2018 Title Differentially Private Regularized Logistic Regression Version 1.2-22 Date 2018-03-19 Author Staal A. Vinterbo Maintainer Staal

More information

Package TilePlot. February 15, 2013

Package TilePlot. February 15, 2013 Package TilePlot February 15, 2013 Type Package Title Characterization of functional genes in complex microbial communities using tiling DNA microarrays Version 1.3 Date 2011-05-04 Author Ian Marshall

More information

Birkbeck College Department of Economics, Mathematics and Statistics.

Birkbeck College Department of Economics, Mathematics and Statistics. Birkbeck College Department of Economics, Mathematics and Statistics. Graduate Certificates and Diplomas Economics, Finance, Financial Engineering 2012 Applied Statistics and Econometrics INTRODUCTION

More information

The biglm Package. August 25, bigglm... 1 biglm Index 5. Bounded memory linear regression

The biglm Package. August 25, bigglm... 1 biglm Index 5. Bounded memory linear regression The biglm Package August 25, 2006 Type Package Title bounded memory linear and generalized linear models Version 0.4 Date 2005-09-24 Author Thomas Lumley Maintainer Thomas Lumley

More information

Package abe. October 30, 2017

Package abe. October 30, 2017 Package abe October 30, 2017 Type Package Title Augmented Backward Elimination Version 3.0.1 Date 2017-10-25 Author Rok Blagus [aut, cre], Sladana Babic [ctb] Maintainer Rok Blagus

More information

Missing Data Analysis for the Employee Dataset

Missing Data Analysis for the Employee Dataset Missing Data Analysis for the Employee Dataset 67% of the observations have missing values! Modeling Setup For our analysis goals we would like to do: Y X N (X, 2 I) and then interpret the coefficients

More information

Package ConvergenceClubs

Package ConvergenceClubs Title Finding Convergence Clubs Package ConvergenceClubs June 25, 2018 Functions for clustering regions that form convergence clubs, according to the definition of Phillips and Sul (2009) .

More information

Package RCA. R topics documented: February 29, 2016

Package RCA. R topics documented: February 29, 2016 Type Package Title Relational Class Analysis Version 2.0 Date 2016-02-25 Author Amir Goldberg, Sarah K. Stein Package RCA February 29, 2016 Maintainer Amir Goldberg Depends igraph,

More information

Package ssd. February 20, Index 5

Package ssd. February 20, Index 5 Type Package Package ssd February 20, 2015 Title Sample Size Determination (SSD) for Unordered Categorical Data Version 0.3 Date 2014-11-30 Author Junheng Ma and Jiayang Sun Maintainer Junheng Ma

More information

Instrumental variables, bootstrapping, and generalized linear models

Instrumental variables, bootstrapping, and generalized linear models The Stata Journal (2003) 3, Number 4, pp. 351 360 Instrumental variables, bootstrapping, and generalized linear models James W. Hardin Arnold School of Public Health University of South Carolina Columbia,

More information