{"id":17513,"date":"2023-04-21T20:27:08","date_gmt":"2023-04-21T18:27:08","guid":{"rendered":"https:\/\/www.graviton.at\/letterswaplibrary\/what-is-the-best-way-to-build-a-model-from-a-dataset-that-has-many-dummy-variables\/"},"modified":"2023-04-21T20:27:08","modified_gmt":"2023-04-21T18:27:08","slug":"what-is-the-best-way-to-build-a-model-from-a-dataset-that-has-many-dummy-variables","status":"publish","type":"post","link":"https:\/\/www.graviton.at\/letterswaplibrary\/what-is-the-best-way-to-build-a-model-from-a-dataset-that-has-many-dummy-variables\/","title":{"rendered":"What Is The Best Way To Build A Model From A Dataset That Has Many Dummy Variables?"},"content":{"rendered":"<p><!-- SC_OFF --><\/p>\n<div class=\"md\">\n<p>Hello everyone,<\/p>\n<p>I have a linear regression model with a single dependent variable and several independent variables. Among the independent variables, I have 4 categorical variables that have been turned into dummies. However, some of the categorical variables have many levels and consequently many dummies were created&#8230;<\/p>\n<p>I need fit the model in a 95% confidence level, so I&#8217;m running the Stepwise algorithm on the model. The Stepwise algorithm &#8220;deleted&#8221; many of the dummies that had been created, causing, for example, that a categorical variable that previously had 10 dummies referring to it, to have only 2 dummies referring to it. That happened because some of the dummies could not be considered at a confidence level of 95%&#8230;<\/p>\n<p>My doubt is, should I discard the categorical variables that had some of their dummies excluded during the Stepwise algorithm and keep only the categorical variables whose all dummies were preserved? Or should I keep the categorical variables which dummies have been excluded? Which of these 2 options is better for a predictive model?<\/p>\n<p>Grateful for anyone who can help.<\/p>\n<\/div>\n<p><!-- SC_ON -->   submitted by   <a href=\"https:\/\/www.reddit.com\/user\/7inchesdream\"> \/u\/7inchesdream <\/a> <br \/> <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/12ucu28\/what_is_the_best_way_to_build_a_model_from_a\/\">[link]<\/a><\/span>   <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/12ucu28\/what_is_the_best_way_to_build_a_model_from_a\/\">[comments]<\/a><\/span><\/p><div class='watch-action'><div class='watch-position align-right'><div class='action-like'><a class='lbg-style1 like-17513 jlk' href='javascript:void(0)' data-task='like' data-post_id='17513' data-nonce='65e0e39b87' rel='nofollow'><img class='wti-pixel' src='https:\/\/www.graviton.at\/letterswaplibrary\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='Like' \/><span class='lc-17513 lc'>0<\/span><\/a><\/div><\/div> <div class='status-17513 status align-right'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Hello everyone, I have a linear regression model with a single dependent variable and several independent variables&#8230;.<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85],"tags":[],"class_list":["post-17513","post","type-post","status-publish","format-standard","hentry","category-datatards","wpcat-85-id"],"_links":{"self":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/17513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/comments?post=17513"}],"version-history":[{"count":0,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/17513\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/media?parent=17513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/categories?post=17513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/tags?post=17513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}