{"id":1218,"date":"2020-02-04T14:37:00","date_gmt":"2020-02-04T13:37:00","guid":{"rendered":"https:\/\/microdata.spirehost.no\/?p=1218"},"modified":"2024-05-03T07:50:54","modified_gmt":"2024-05-03T06:50:54","slug":"new-command-for-random-population-sub-selections","status":"publish","type":"post","link":"https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/","title":{"rendered":"New command for random population sub-selections"},"content":{"rendered":"\n<p>Random population sub-selections are now possible through the new command&nbsp;<code>sample<\/code>.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>For users operating with large populations\/datasets, data adaptations, codings and analysis may become resource demanding and time consuming to execute. In such cases, the&nbsp;<code>sample<\/code>&nbsp;command may be used as a tool by trimming your population, in order for your executions to run more smoothly. Thus, it is possible to test your command scripts on a smaller sample before performing final executions on a total population.<\/p>\n\n\n\n<p>Also, for various testing purposes, such as testing of statistical methods or other statistics,&nbsp;<code>sample<\/code>&nbsp;may be a useful tool.<\/p>\n\n\n\n<p>The command expects two input parametres: Sample size and seed number (in this particular order). By specifying a decimal number (0.0 &#8211; 1.0), your dataset will be trimmed down to the specific random sample share. By specifying an integer &gt; 1000, your random sample will consist of this number of individuals.<\/p>\n\n\n\n<p>The seed number is a custom positive integer which ensures that the random sample is identical when performing consecutive executions of the same script. If another seed number is specified, a new sample will be randomly chosen, different from the previous.<\/p>\n\n\n\n<p>Example of a 10% random sample sub-selection using the seed 1234:<\/p>\n\n\n<div id=\"rose-block_b8d0dd2cfd7dd6df35e1474a98182010\" class=\"rose-code codeblock-wrapper\">\n<pre tabindex=\"0\" class=\"codeblock\"><code>sample 0.1 1234<\/code><\/pre>\n<\/div>\n\n\n<p>Example of a random sample consisting of 10 000 individuals, using the seed 1234:<\/p>\n\n\n<div id=\"rose-block_34130d1e5b2e8ea5cc4681a3e7754e75\" class=\"rose-code codeblock-wrapper\">\n<pre tabindex=\"0\" class=\"codeblock\"><code>sample 10000 1234<\/code><\/pre>\n<\/div>\n\n\n<p>Example of a new 10% random sample sub-selection different from the first example, using another seed:<\/p>\n\n\n<div id=\"rose-block_7d20cfc45c6423d641bcb46a11f1dab6\" class=\"rose-code codeblock-wrapper\">\n<pre tabindex=\"0\" class=\"codeblock\"><code>sample 0.1 5678<\/code><\/pre>\n<\/div>\n\n\n<p><a href=\"https:\/\/microdata.no\/manual\/en\/eksempel\/Grunnleggende%20operasjoner\/Trekke%20tilfeldige%20utvalg%20fra%20en%20totalpopulasjon\">Click here for more examples<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Random population sub-selections are now possible through the new command&nbsp;sample.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","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":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-1218","post","type-post","status-publish","format-standard","hentry","category-news"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>New command for random population sub-selections - 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\/en\/new-command-for-random-population-sub-selections\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New command for random population sub-selections - microdata.no\" \/>\n<meta property=\"og:description\" content=\"Random population sub-selections are now possible through the new command&nbsp;sample.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/\" \/>\n<meta property=\"og:site_name\" content=\"microdata.no\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-04T13:37:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-03T06:50:54+00:00\" \/>\n<meta name=\"author\" content=\"Trond Pedersen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Trond Pedersen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-command-for-random-population-sub-selections\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-command-for-random-population-sub-selections\\\/\"},\"author\":{\"name\":\"Trond Pedersen\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#\\\/schema\\\/person\\\/76761ddfe0d06e3f08f5491a9faeab92\"},\"headline\":\"New command for random population sub-selections\",\"datePublished\":\"2020-02-04T13:37:00+00:00\",\"dateModified\":\"2024-05-03T06:50:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-command-for-random-population-sub-selections\\\/\"},\"wordCount\":235,\"articleSection\":[\"News\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-command-for-random-population-sub-selections\\\/\",\"url\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-command-for-random-population-sub-selections\\\/\",\"name\":\"New command for random population sub-selections - microdata.no\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#website\"},\"datePublished\":\"2020-02-04T13:37:00+00:00\",\"dateModified\":\"2024-05-03T06:50:54+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#\\\/schema\\\/person\\\/76761ddfe0d06e3f08f5491a9faeab92\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-command-for-random-population-sub-selections\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-command-for-random-population-sub-selections\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/new-command-for-random-population-sub-selections\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hjem\",\"item\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New command for random population sub-selections\"}]},{\"@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\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#\\\/schema\\\/person\\\/76761ddfe0d06e3f08f5491a9faeab92\",\"name\":\"Trond Pedersen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b90e3f42c839e825d86949fc2f9a318f2a81da5f9e6b1431ff4d872333d4e717?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b90e3f42c839e825d86949fc2f9a318f2a81da5f9e6b1431ff4d872333d4e717?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b90e3f42c839e825d86949fc2f9a318f2a81da5f9e6b1431ff4d872333d4e717?s=96&d=mm&r=g\",\"caption\":\"Trond Pedersen\"},\"url\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/author\\\/trond\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"New command for random population sub-selections - 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\/en\/new-command-for-random-population-sub-selections\/","og_locale":"en_US","og_type":"article","og_title":"New command for random population sub-selections - microdata.no","og_description":"Random population sub-selections are now possible through the new command&nbsp;sample.","og_url":"https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/","og_site_name":"microdata.no","article_published_time":"2020-02-04T13:37:00+00:00","article_modified_time":"2024-05-03T06:50:54+00:00","author":"Trond Pedersen","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Trond Pedersen","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/#article","isPartOf":{"@id":"https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/"},"author":{"name":"Trond Pedersen","@id":"https:\/\/www.microdata.no\/#\/schema\/person\/76761ddfe0d06e3f08f5491a9faeab92"},"headline":"New command for random population sub-selections","datePublished":"2020-02-04T13:37:00+00:00","dateModified":"2024-05-03T06:50:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/"},"wordCount":235,"articleSection":["News"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/","url":"https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/","name":"New command for random population sub-selections - microdata.no","isPartOf":{"@id":"https:\/\/www.microdata.no\/#website"},"datePublished":"2020-02-04T13:37:00+00:00","dateModified":"2024-05-03T06:50:54+00:00","author":{"@id":"https:\/\/www.microdata.no\/#\/schema\/person\/76761ddfe0d06e3f08f5491a9faeab92"},"breadcrumb":{"@id":"https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.microdata.no\/en\/new-command-for-random-population-sub-selections\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hjem","item":"https:\/\/www.microdata.no\/en\/"},{"@type":"ListItem","position":2,"name":"New command for random population sub-selections"}]},{"@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"},{"@type":"Person","@id":"https:\/\/www.microdata.no\/#\/schema\/person\/76761ddfe0d06e3f08f5491a9faeab92","name":"Trond Pedersen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b90e3f42c839e825d86949fc2f9a318f2a81da5f9e6b1431ff4d872333d4e717?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b90e3f42c839e825d86949fc2f9a318f2a81da5f9e6b1431ff4d872333d4e717?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b90e3f42c839e825d86949fc2f9a318f2a81da5f9e6b1431ff4d872333d4e717?s=96&d=mm&r=g","caption":"Trond Pedersen"},"url":"https:\/\/www.microdata.no\/en\/author\/trond\/"}]}},"taxonomy_info":{"category":[{"value":2,"label":"News"}]},"featured_image_src_large":false,"author_info":{"display_name":"Trond Pedersen","author_link":"https:\/\/www.microdata.no\/en\/author\/trond\/"},"comment_info":0,"category_info":[{"term_id":2,"name":"News","slug":"news","term_group":0,"term_taxonomy_id":2,"taxonomy":"category","description":"","parent":0,"count":79,"filter":"raw","cat_ID":2,"category_count":79,"category_description":"","cat_name":"News","category_nicename":"news","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/posts\/1218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/comments?post=1218"}],"version-history":[{"count":10,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/posts\/1218\/revisions"}],"predecessor-version":[{"id":4554,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/posts\/1218\/revisions\/4554"}],"wp:attachment":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/media?parent=1218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/categories?post=1218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/tags?post=1218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}