{"title":"KRLS: A Stata Package for Kernel-Based Regularized Least Squares","authors":"Jeremy Ferwerda, Jens Hainmueller, C. Hazlett","doi":"10.2139/ssrn.2325523","DOIUrl":null,"url":null,"abstract":"The Stata package krls implements kernel-based regularized least squares (KRLS), a machine learning method described in Hainmueller and Hazlett (2014) that allows users to tackle regression and classi cation problems without strong functional form assumptions or a speci cation search. The flexible KRLS estimator learns the functional form from the data, thereby protecting inferences against misspeci cation bias. Yet it nevertheless allows for interpretability and inference in ways similar to ordinary regression models. In particular, KRLS provides closed-form estimates for the predicted values, variances, and the pointwise partial derivatives that characterize the marginal e ects of each independent variable at each data point in the covariate space. The method is thus a convenient and powerful alternative to OLS and other GLMs for regression-based analyses. We also provide a companion package and replication code that implements the method in R.","PeriodicalId":264857,"journal":{"name":"ERN: Semiparametric & Nonparametric Methods (Topic)","volume":"56 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"14","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ERN: Semiparametric & Nonparametric Methods (Topic)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.2139/ssrn.2325523","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 14
Abstract
The Stata package krls implements kernel-based regularized least squares (KRLS), a machine learning method described in Hainmueller and Hazlett (2014) that allows users to tackle regression and classi cation problems without strong functional form assumptions or a speci cation search. The flexible KRLS estimator learns the functional form from the data, thereby protecting inferences against misspeci cation bias. Yet it nevertheless allows for interpretability and inference in ways similar to ordinary regression models. In particular, KRLS provides closed-form estimates for the predicted values, variances, and the pointwise partial derivatives that characterize the marginal e ects of each independent variable at each data point in the covariate space. The method is thus a convenient and powerful alternative to OLS and other GLMs for regression-based analyses. We also provide a companion package and replication code that implements the method in R.