{"id":153,"date":"2015-03-16T09:27:15","date_gmt":"2015-03-16T08:27:15","guid":{"rendered":"http:\/\/candrea.ch\/blog\/?p=153"},"modified":"2015-03-16T09:27:15","modified_gmt":"2015-03-16T08:27:15","slug":"new-r-package-betas","status":"publish","type":"post","link":"https:\/\/candrea.ch\/blog\/new-r-package-betas\/","title":{"rendered":"New R Package &#8220;betas&#8221;"},"content":{"rendered":"<p>In social science it is often required to compute standardized regression coefficients &#8211; called beta coefficients, or simply betas. These betas can be interpreted as effects, and thus are independent of the original scale.<\/p>\n<p>There are two approaches how you can obtain betas. You\u00a0Z-standardize the data before fitting\u00a0or you compute the betas after fitting the model.<\/p>\n<p>The first approach has flaws if you have non-numeric variables in your data or\u00a0if you intent to incorporate\u00a0interaction terms in your model.<\/p>\n<p>The second approach is a way more convenient, but until now there was no R package helping you compute betas for as many kinds of models as you needed. For example with\u00a0lm.beta() from &#8220;QuantPsyc&#8221; Package you cannot handle models with factors with more than two levels.<\/p>\n<p>The features of the &#8220;betas&#8221; R package are (so far for v0.1.1):<\/p>\n<p>Compute standardized beta coefficients and corresponding standard errors for the following models:<\/p>\n<ul>\n<li>linear regression models with numerical covariates only<\/li>\n<li>linear regression models with numerical and factorial covariates<\/li>\n<li>weighted linear regression models<\/li>\n<li>all these linear regression models with interaction terms<\/li>\n<li>robust linear regression models with numerical covariates only<\/li>\n<\/ul>\n<p>You can install the package from CRAN (<a href=\"http:\/\/cran.r-project.org\/web\/packages\/betas\/\">http:\/\/cran.r-project.org\/web\/packages\/betas\/<\/a>):<\/p>\n<pre class=\"lang:r decode:true \">install.packages(\"betas\")\r\nlibrary(betas)<\/pre>\n<p>The package is maintained on GitHub:\u00a0<a href=\"https:\/\/github.com\/andreaphsz\/betas\">https:\/\/github.com\/andreaphsz\/betas<\/a>\u00a0.<\/p>\n<p>Feel free to report issues:\u00a0<a href=\"https:\/\/github.com\/andreaphsz\/betas\/issues\">https:\/\/github.com\/andreaphsz\/betas\/issues<\/a>\u00a0.<\/p>\n<p>Enjoy hassle-free computations of betas in R!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In social science it is often required to compute standardized regression coefficients &#8211; called beta coefficients, or simply betas. These betas can be interpreted as effects, and thus are independent of the original scale. There are two approaches how you can obtain betas. You\u00a0Z-standardize the data before fitting\u00a0or you compute the betas after fitting the &hellip; <a href=\"https:\/\/candrea.ch\/blog\/new-r-package-betas\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">New R Package &#8220;betas&#8221;<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-153","post","type-post","status-publish","format-standard","hentry","category-r"],"_links":{"self":[{"href":"https:\/\/candrea.ch\/blog\/wp-json\/wp\/v2\/posts\/153"}],"collection":[{"href":"https:\/\/candrea.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/candrea.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/candrea.ch\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/candrea.ch\/blog\/wp-json\/wp\/v2\/comments?post=153"}],"version-history":[{"count":3,"href":"https:\/\/candrea.ch\/blog\/wp-json\/wp\/v2\/posts\/153\/revisions"}],"predecessor-version":[{"id":156,"href":"https:\/\/candrea.ch\/blog\/wp-json\/wp\/v2\/posts\/153\/revisions\/156"}],"wp:attachment":[{"href":"https:\/\/candrea.ch\/blog\/wp-json\/wp\/v2\/media?parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/candrea.ch\/blog\/wp-json\/wp\/v2\/categories?post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/candrea.ch\/blog\/wp-json\/wp\/v2\/tags?post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}