{"id":1301,"date":"2022-02-14T15:01:13","date_gmt":"2022-02-14T14:01:13","guid":{"rendered":"https:\/\/microdata.spirehost.no\/?post_type=eksempel&#038;p=1301"},"modified":"2023-08-18T13:31:06","modified_gmt":"2023-08-18T12:31:06","slug":"paneldata-analysis","status":"publish","type":"eksempel","link":"https:\/\/www.microdata.no\/en\/eksempel\/paneldata-analysis\/","title":{"rendered":"Paneldata analysis"},"content":{"rendered":"\n<p>Paneldata analysis is a more advanced form of linear regression analysis where variance over time is taken into account for the variables included. This form of analysis has many similarities with ordinary regression analysis (OLS). Among other things, the dependent variable (which is listed first in the regression panel command) must contain values \u200b\u200bwith continuous\/metric format, e.g. income.<\/p>\n\n\n\n<p>The main difference from ordinary regression analysis (cf. the command <code>regress<\/code>) is that the data must be organized in a panel format where all variables are measured several times depending on how many measurement points are specified through the command <code>import-panel<\/code>. A panel dataset will then consist of T x N observations, where T stands for the number of measurement points and N stands for the number of units in the population.<\/p>\n\n\n\n<p>NB! Panel data sets can often become very large as each unit is measured more than once: If you analyse the entire population and use 2 measurement points, the data set will typically consist of approx. 10 million observations (5 million x 2). SO: Preferably use as small populations as possible, and preferably below 1 million units. Otherwise, the system will be pushed so that executions will be very time-consuming.<\/p>\n\n\n<div id=\"rose-block_5ea4ef95cbbaeacf502cd9d21a8d2fb6\" class=\"rose-code codeblock-wrapper\">\n<pre tabindex=\"0\" class=\"codeblock\"><code>\/\/Connect to database\r\nrequire no.ssb.fdb:23 as db\r\n\r\n\/\/First create a paneldata population (should be as small as possible)\r\n\/\/Population: Persons who complete their masters studies in the autumn semester of 2015\r\ncreate-dataset population\r\nimport db\/NUDB_AAR_FORSTE_FULLF_HOV as compl_master\r\nkeep if compl_master > 201507 & compl_master < 201601\r\n\r\n\/\/Create a new and empty dataset that consists of the individuals from the dataset population\r\nclone-units population paneldata\r\n\r\n\/\/Import a set of variables measured at given measurement dates into the empty dataset\r\nuse paneldata\r\nimport-panel db\/INNTEKT_WLONN db\/SIVSTANDFDT_SIVSTAND db\/BEFOLKNING_KOMMNR_FAKTISK 2016-01-01 2017-01-01 2018-01-01 2019-01-01\r\n\r\n\/\/Recode and run descriptive statistics and regression analysis\r\nrename INNTEKT_WLONN wage\r\ngenerate married = 0\r\nreplace married = 1 if SIVSTANDFDT_SIVSTAND == '2'\r\ngenerate oslo = 0\r\nreplace oslo = 1 if BEFOLKNING_KOMMNR_FAKTISK == '0301'\r\n\r\ntabulate-panel married\r\ntabulate-panel oslo\r\ntabulate-panel married oslo\r\n\r\nsummarize-panel wage\r\ntransitions-panel oslo married\r\n\r\n\/\/Run paneldata regression with resp. fixed og random effects \r\nregress-panel wage married oslo, fe\r\nregress-panel wage married oslo, re\r\n\r\n\/\/Run hausman-test\r\nhausman wage married oslo<\/code><\/pre>\n<\/div>","protected":false},"parent":0,"menu_order":127,"template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":""},"class_list":["post-1301","eksempel","type-eksempel","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Paneldata analysis - microdata.no<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.microdata.no\/eksempel\/paneldata-analyse\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Paneldata analysis - microdata.no\" \/>\n<meta property=\"og:description\" content=\"Paneldata analysis is a more advanced form of linear regression analysis where variance over time is taken into account for the variables included. This form of analysis has many similarities with ordinary regression analysis (OLS). Among other things, the dependent variable (which is listed first in the regression panel command) must contain values \u200b\u200bwith continuous\/metric...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microdata.no\/eksempel\/paneldata-analyse\/\" \/>\n<meta property=\"og:site_name\" content=\"microdata.no\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-18T12:31:06+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/eksempel\\\/paneldata-analyse\\\/\",\"url\":\"https:\\\/\\\/www.microdata.no\\\/eksempel\\\/paneldata-analyse\\\/\",\"name\":\"Paneldata analysis - microdata.no\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#website\"},\"datePublished\":\"2022-02-14T14:01:13+00:00\",\"dateModified\":\"2023-08-18T12:31:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/eksempel\\\/paneldata-analyse\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.microdata.no\\\/eksempel\\\/paneldata-analyse\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/eksempel\\\/paneldata-analyse\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hjem\",\"item\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Paneldata analysis\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#website\",\"url\":\"https:\\\/\\\/www.microdata.no\\\/\",\"name\":\"microdata.no\",\"description\":\"Gj\u00f8r det enklere \u00e5 analysere registerdata\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.microdata.no\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Paneldata analysis - microdata.no","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.microdata.no\/eksempel\/paneldata-analyse\/","og_locale":"en_US","og_type":"article","og_title":"Paneldata analysis - microdata.no","og_description":"Paneldata analysis is a more advanced form of linear regression analysis where variance over time is taken into account for the variables included. This form of analysis has many similarities with ordinary regression analysis (OLS). Among other things, the dependent variable (which is listed first in the regression panel command) must contain values \u200b\u200bwith continuous\/metric...","og_url":"https:\/\/www.microdata.no\/eksempel\/paneldata-analyse\/","og_site_name":"microdata.no","article_modified_time":"2023-08-18T12:31:06+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.microdata.no\/eksempel\/paneldata-analyse\/","url":"https:\/\/www.microdata.no\/eksempel\/paneldata-analyse\/","name":"Paneldata analysis - microdata.no","isPartOf":{"@id":"https:\/\/www.microdata.no\/#website"},"datePublished":"2022-02-14T14:01:13+00:00","dateModified":"2023-08-18T12:31:06+00:00","breadcrumb":{"@id":"https:\/\/www.microdata.no\/eksempel\/paneldata-analyse\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microdata.no\/eksempel\/paneldata-analyse\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.microdata.no\/eksempel\/paneldata-analyse\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hjem","item":"https:\/\/www.microdata.no\/en\/"},{"@type":"ListItem","position":2,"name":"Paneldata analysis"}]},{"@type":"WebSite","@id":"https:\/\/www.microdata.no\/#website","url":"https:\/\/www.microdata.no\/","name":"microdata.no","description":"Gj\u00f8r det enklere \u00e5 analysere registerdata","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microdata.no\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"taxonomy_info":[],"featured_image_src_large":[],"author_info":[],"comment_info":"","_links":{"self":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/eksempel\/1301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/eksempel"}],"about":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/types\/eksempel"}],"wp:attachment":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/media?parent=1301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}