Man pages for apoorvalal/LalRUtils
Lal's utility scripts for personal use

append_to_sqliteCallback function that appends new sections to the SQLite...
ate_diffmeansSimple Difference in Means estimator for binary treatment...
balance_tableBalance Check for observational studies
bbootBayesian bootstrap for linear regression
binscatterR implementation of binned scatterplot and CEF plotter, with...
calibPlotplot calibration
california_prop99California proposition 99
chrcoerce to string
classifEvalClassification Evaluation
clipclip vector to specified range (clone of np.clip)
convert_all_to_csvWrites all dataframes to csv
createFoldscreate folds for cross-fitting
csv_to_sqliteFork of inborutils::csv_to_sqlite to save a delimited text...
dataPkglist datasets in package
DMLRegSimple Double-ML implementation with cross-fitting
dta_vlabsSmall summary table with stata variable labels from DTA file
expitinverse logit fn
fitGetreturn cross-fit predictions from glmnet object
fmla_kthconstruct formula with outcome and polynomial terms
formula_fixestStitches together formula for use in fixest::feols
formula_lfeStitches together formula for use in felm
formula_stitcherStitches together formula for use in lm/glm
freq_tableSummary table with percentages for categorical variables
fromLimportFLoads specific function or list of functions f from library l
fuzzy_matchfuzzy matches 2 character vectors, and returns most similar...
get_and_unzipdownloads and unzips file if it is not found in current wdir
getNthElementGet n'th element in list of lists
grapes-not-in-grapesnot.in function
interSparseMprepare sparse X matrix with interactions
KS2007_dgpKang Schaefer (2007) DGP for 'mild' confounding
label_extractorextracts variable labels and returns a dataframe with...
lal_map_themeTheme for maps
lalonde.expExperimental data from the job training program first studied...
lalonde.psidNon-experimental data from Lalonde (1986)
lal_plot_themetheme for nice looking plots with sensible defaults (no...
lal_plot_theme_dWrapper for hrbrthemes::theme_ft_rc() with bigger font,...
lenShorter length
libreqLoads a list of libraries, installs when necessary - Take 2
listOmitIfOmit element if it contains "contains"
load_or_installLoads a list of libraries, installs when necessary
lvlast value
maskMatrixmask a matrix using another matrix
matrmatrix constructor
mcReplicateMulti-core replicate. Use multiple cores for repeated...
mcSapplyMulti-core sapply Use multiple cores for simplifying apply.
mlslist methods for object
mMscalemin-max scale (maps continuous variable to [0, 1])
multiplotStitches together multiple ggplot objects for export-ready...
naOmitListOmit NA entries in list
newtonRootsolve for roots using the NR update rule x1 = x0 −...
norm_diffNormalised Difference (Imbens, Rubin 2015) for observational...
nuniquenumber of unique values in vector
OLSwCompute OLS with arbitrary vector of weights (possibly...
overlap_histogramHistogram of pscore distributions in treatment and control...
panelMatricesConvert a long panel to wide matrix (cleaner data.table...
panel_treat_plotplot binary treatment status for time series for panel...
polySieveMprepare X matrix with flexible interactions and polynomials
portal_hexcodesHex codes for portal game colours (blue and orange)
prplotPartial Residual Plot
pumsPublic use wage, education data from 1980 census. Used in...
rdr_exportSummary table for Rdrobust estimates to export using...
read_all_filesReads in all datasets in given location
reg_adjustRegression Adjustment estimation of ATE or ATT
regplot_densScatterplot with regression line and densites by grouping...
residualisePartial out controls and fixed effects and return...
robustifyReplaces the standard errors (t and p vals)in FELM model...
sourceDirSource all R scripts in directory
stat_transfer_dataPopulates a stat-transfer script to convert files to CSV
subclassifyCompute subclassification ATT and ATE
summarSummary table
summary.bbootsummary method for bayesian bootstrap
timeStampTimestamp with no spaces for filenames
tsplotterCanned subroutine to plot time series for several variables
ttsplittest-train split
vnormt-norm of a vector
withFrameggplot with frame
apoorvalal/LalRUtils documentation built on Sept. 22, 2023, 5:53 p.m.