regtable: Returns a matrix and LaTex table with results from a set of...

Description Usage Arguments Value Examples

View source: R/regtable.r

Description

Returns a matrix and LaTex table with results from a set of linear regressions (using lm())

Usage

1
regtable(form, datav, namescol, namesrow, stars, wgh, rbst, clst, dec)

Arguments

form

list with formulas

datav

data for regressions

namescol

tittles of regression

namesrow

regressors name

stars

TRUE for stars in the table

wgh

name of variable used to weight regression

rbst

TRUE for robust errors

clst

name of variable used to cluster errors

dec

number of decimals in the table

Value

$matrix returns a matrix with all the results from the regression, $latex returns a latex table with all the results from the regression

Examples

1
2
3
4
5
6
7
8
form<-list()
form[[1]]<-log(Total_Trade_Amount_2015_Thousand_USD)~log(GDP_2015_USD)
form[[2]]<-log(Total_Trade_Amount_2015_Thousand_USD)~log(GDP_2015_USD)+log(Distance_from_Largest_City_to_NYC_miles)
namescol<-c('GDP 2015', 'GDP & Distance')
namesrow<-c('GDP 2015', 'Distance')
lmtable_res<-regtable(form,datav=trade,namescol,namesrow)
mtrx<-lmtable_res$matrix
lmtable_res$latex

marangoisa/RegressionVisuals documentation built on Nov. 4, 2019, 5:21 p.m.