Home > data cleaning > Compute the self excluded sample mean by group

## Compute the self excluded sample mean by group

egen(stata cmd) compute a summary statistics by groups and store it in to a new variable. For example, the data has three variables, id, time and y, we want to compute the mean of y by for each id and then store it as a new variable mean_y.

In stata, the command would be

egen mean_y = mean(y), by(id)

In R, this task can be completed by `ave`

Generate dataset:

```id <- rep(1:3,each=3)
t<-rep(1:3,3)
y<-sample(1:5,9,replace=T)
my_data<-data.frame(id=id,time=t,y=y)
```

Orignal data:

```> my_data
id time y
1  1    1 4
2  1    2 1
3  1    3 4
4  2    1 2
5  2    2 3
6  2    3 3
7  3    1 4
8  3    2 4
9  3    3 3
```
```> within(my_data, {mean_y = ave(y,id)} )
id time y   mean_y
1  1    1 4 3.000000
2  1    2 1 3.000000
3  1    3 4 3.000000
4  2    1 2 2.666667
5  2    2 3 2.666667
6  2    3 3 2.666667
7  3    1 4 3.666667
8  3    2 4 3.666667
9  3    3 3 3.666667
```

The default summary statistics is `mean`. However, we can assign a particular function to compute the summary statistics. For example, if we want to compute the sd of y by id, then we can have

```within(my_data, {sd_y = ave(y,id,FUN=sd)} )
id time y      sd_y
1  1    1 4 1.7320508
2  1    2 1 1.7320508
3  1    3 4 1.7320508
4  2    1 2 0.5773503
5  2    2 3 0.5773503
6  2    3 3 0.5773503
7  3    1 4 0.5773503
8  3    2 4 0.5773503
9  3    3 3 0.5773503
```

Remark: The `within` evaluate an expression in an environment created from the data.frame. In addition, it will modify the data.frame and return it back(in our case, it create new variables, mean_y or sd_y )

Here is another usage of `ave`. We would like to create a self excluded sample mean by group.

Suppose the data has three variables, id, time and y, we want to compute the mean of y by for each id but excluding the value of y of current time period.

```id <- rep(1:3,each=3)
t<-rep(1:3,3)
y<-sample(1:5,9,replace=T)
my_data<-data.frame(id=id,time=t,y=y)
```

Orignal data:

```> my_data
id time y
1  1    1 4
2  1    2 1
3  1    3 4
4  2    1 2
5  2    2 3
6  2    3 3
7  3    1 4
8  3    2 4
9  3    3 3
```

First, we need a function to compute the self excluded mean. This function takes a vector and a function(default is mean) as argument. It apply the function to the vector where one of the element is removed. The return value is a vector that i-th element is given by FUN(x[-i])

```excludeSelfSummary<-function(x,FUN=mean){
sapply(1:length(x), function(i) FUN(x[-i]))
}
> excludeSelfSummary(1:5,mean)
[1] 3.50 3.25 3.00 2.75 2.50
> excludeSelfSummary(1:5,min)
[1] 2 1 1 1 1
> excludeSelfSummary(1:5,max)
[1] 5 5 5 5 4
```

Then we pass the `excludeSelfSummary into ave as argument. `

``` > within(my_data, {sd_y = ave(y,id,FUN=excludeSelfSummary)} ) id time y sd_y 1 1 1 4 2.5 2 1 2 1 4.0 3 1 3 4 2.5 4 2 1 2 3.0 5 2 2 3 2.5 6 2 3 3 2.5 7 3 1 4 3.5 8 3 2 4 3.5 9 3 3 3 4.0 Of course, we could compute the self excluded minimum or maximum. > within(my_data, {sd_y = ave(y,id,FUN=function(x) excludeSelfSummary(x,min) )}) id time y sd_y 1 1 1 4 1 2 1 2 1 4 3 1 3 4 1 4 2 1 2 3 5 2 2 3 2 6 2 3 3 2 7 3 1 4 3 8 3 2 4 3 9 3 3 3 4 About these ads var wpcom_adclk_hovering = false; var wpcom_adclk_recorded = false; var wpcom_adclk_theme = "INove"; var wpcom_adclk_slot = "wpcom_below_post"; var wpcom_adclk_network = ( typeof wpcom_adclk_network === "undefined" ) ? "" : wpcom_adclk_network ; jQuery(document).ready( function() { function wpcom_adclk_hover_yes() { wpcom_adclk_hovering = true; } function wpcom_adclk_hover_no() { wpcom_adclk_hovering = false; } jQuery(".wpa").click(wpcom_adclk_click); jQuery(".wpa iframe").hover( wpcom_adclk_hover_yes, wpcom_adclk_hover_no ); jQuery(".wpa object").hover( wpcom_adclk_hover_yes, wpcom_adclk_hover_no ); jQuery(window).blur( function() { if ( wpcom_adclk_hovering ) { wpcom_adclk_click(); } }); }); function wpcom_adclk_impression() { var stat_gif = document.location.protocol + "//stats.wordpress.com/g.gif?v=wpcom-no-pv"; stat_gif += "&x_ads_imp_theme=" + wpcom_adclk_theme; stat_gif += "&x_ads_imp_placement="+wpcom_adclk_slot; stat_gif += "&x_ads_imp_network=" + wpcom_adclk_network; stat_gif += "&x_ads_imp_theme_network="+wpcom_adclk_theme+"_"+wpcom_adclk_network; new Image().src = stat_gif + "&baba=" + Math.random(); return true; } function wpcom_adclk_click() { if (wpcom_adclk_recorded) { return true; } // no double counting var stat_gif = document.location.protocol + "//stats.wordpress.com/g.gif?v=wpcom-no-pv"; stat_gif += "&x_ads_click_theme=" + wpcom_adclk_theme; stat_gif += "&x_ads_click_placement="+wpcom_adclk_slot; stat_gif += "&x_ads_click_network=" + wpcom_adclk_network; stat_gif += "&x_ads_click_theme_network="+wpcom_adclk_theme+"_"+wpcom_adclk_network; new Image().src = stat_gif + "&baba=" + Math.random(); wpcom_adclk_recorded = true; var now=new Date(); var end=now.getTime()+250; while(true){now=new Date();if(now.getTime()>end){break;}} return true; } if ( typeof GA_googleAddAttr == 'function' ) { GA_googleAddAttr("AdOpt", "1"); GA_googleAddAttr("Origin", "other"); GA_googleAddAttr("LangId", "1"); GA_googleAddAttr("Domain", "ctszkin.com"); GA_googleAddAttr("BlogId", "25621776"); GA_googleAddAttr("Autotag", "technology"); GA_googleAddAttr("Tag", "data-cleaning"); GA_googleAddAttr("theme_bg", "ffffff"); GA_googleAddAttr("theme_border", "eeeeee"); GA_googleAddAttr("theme_text", "555555"); GA_googleAddAttr("theme_link", "2970A6"); GA_googleAddAttr("theme_url", "c8c7c7"); GA_googleAddAdSensePageAttr("google_page_url", "http://ctszkin.com/2013/02/12/compute-the-self-excluded-sample-mean-by-group/"); GA_googleFillSlot("wpcom_below_post"); } div.wpa>div { margin-top: 1em; } #google_ads_div_wpcom_below_post_adsafe_ad_container { display: block !important; } jQuery( window ).load( function() { if ( jQuery(".wpa script[src*='shareth.ru']").length > 0 || jQuery(".wpa iframe[src*='boomvideo.tv']").length > 0 || jQuery(".wpa iframe[src*='viewablemedia.net']").length > 0 || jQuery(".wpa .sharethrough-placement").length > 0 ) { jQuery( '.wpa' ).css( 'width', '400px' ); } setTimeout(function(){if(typeof GS_googleAddAdSenseService !== 'function'){new Image().src=document.location.protocol+"//stats.wordpress.com/g.gif?v=wpcom-no-pv&x_noads=adblock&baba="+Math.random()}},100); } ); Share this:TwitterFacebookLike this:Like Loading... ```
``` Categories: data cleaning ```
``` Comments (0) Trackbacks (0) Leave a comment Trackback No comments yet. No trackbacks yet. Leave a Reply Enter your comment here... Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account. ( Log Out / Change ) You are commenting using your Twitter account. ( Log Out / Change ) You are commenting using your Facebook account. ( Log Out / Change ) You are commenting using your Google+ account. ( Log Out / Change ) Cancel Connecting to %s var highlander_expando_javascript = function(){ var input = document.createElement( 'input' ), comment = jQuery( '#comment' ); if ( 'placeholder' in input ) { comment.attr( 'placeholder', jQuery( '.comment-textarea label' ).remove().text() ); } // Expando Mode: start small, then auto-resize on first click + text length jQuery( '#comment-form-identity' ).hide(); jQuery( '#comment-form-subscribe' ).hide(); jQuery( '#commentform .form-submit' ).hide(); comment.css( { 'height':'10px' } ).one( 'focus', function() { var timer = setInterval( HighlanderComments.resizeCallback, 10 ) jQuery( this ).animate( { 'height': HighlanderComments.initialHeight } ).delay( 100 ).queue( function(n) { clearInterval( timer ); HighlanderComments.resizeCallback(); n(); } ); jQuery( '#comment-form-identity' ).slideDown(); jQuery( '#comment-form-subscribe' ).slideDown(); jQuery( '#commentform .form-submit' ).slideDown(); }); } jQuery(document).ready( highlander_expando_javascript ); Notify me of follow-up comments via email. A handy concatenation operator How to do egen (stata cmd) in R ```
``` RSS feed Google Youdao Xian Guo Zhua Xia My Yahoo! newsgator Bloglines iNezha RSS - Posts Blog Stats 4,615 hits Recent Posts Construct an unique index from two integer (Pairing Function) A handy concatenation operator Compute the self excluded sample mean by group How to do egen (stata cmd) in R Generating a lag/lead variables Categories Custom Function data cleaning R programming stata Uncategorized Archives April 2013 February 2013 March 2012 October 2011 September 2011 Custom Function data cleaning R programming stata Uncategorized Search for: Econometrics Econometric Sense R R-Bloggers Statistics Blog Statistics Statistics Blog ```
``` Top Blog at WordPress.com. Blog at WordPress.com. The INove Theme. ```
``` ```
``` var _qevents = _qevents || [], wpcomQuantcastData = {"qacct":"p-18-mFEk4J448M","labels":"language.en,type.wpcom,wp.loggedout,as"}; function wpcomQuantcastPixel( labels, options ) { var i, defaults = wpcomQuantcastData, data = { event: 'ajax' }; labels = labels || ''; options = options || {}; if ( typeof labels != 'string' ) options = labels; for ( i in defaults ) { data[i] = defaults[i]; } for ( i in options ) { data[i] = options[i]; } if ( data.labels ) { data.labels += ',' + labels; } else { data.labels = labels; } _qevents.push( data ); }; (function() {var elem = document.createElement('script');elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js";elem.async = true;elem.type = "text/javascript";var scpt = document.getElementsByTagName('script')[0];scpt.parentNode.insertBefore(elem, scpt); })(); _qevents.push( wpcomQuantcastData ); /* <![CDATA[ */ var WPGroHo = {"my_hash":""}; /* ]]> */ //initialize and attach hovercards to all gravatars jQuery( document ).ready( function( \$ ) { Gravatar.profile_cb = function( hash, id ) { WPGroHo.syncProfileData( hash, id ); }; Gravatar.my_hash = WPGroHo.my_hash; Gravatar.init( 'body', '#wp-admin-bar-my-account' ); }); /* <![CDATA[ */ var HighlanderComments = {"loggingInText":"Logging In\u2026","submittingText":"Posting Comment\u2026","postCommentText":"Post Comment","connectingToText":"Connecting to %s","commentingAsText":"%1\$s: You are commenting using your %2\$s account.","logoutText":"Log Out","loginText":"Log In","connectURL":"http:\/\/rlearner.wordpress.com\/public.api\/connect\/?action=request","logoutURL":"http:\/\/rlearner.wordpress.com\/wp-login.php?action=logout&_wpnonce=07bf4450fd","homeURL":"http:\/\/ctszkin.com\/","postID":"138","gravDefault":"identicon","enterACommentError":"Please enter a comment","enterEmailError":"Please enter your email address here","invalidEmailError":"Invalid email address","enterAuthorError":"Please enter your name here","gravatarFromEmail":"This picture will show whenever you leave a comment. Click to customize it.","logInToExternalAccount":"Log in to use details from one of these accounts.","change":"Change","changeAccount":"Change Account","comment_registration":"0","userIsLoggedIn":"","isJetpack":"0"}; /* ]]> */ Follow Follow “R HEAD” Get every new post delivered to your Inbox. Powered by WordPress.com var skimlinks_pub_id = "725X584219" var skimlinks_sitename = "58pfl9955.wordpress.com"; WPCOM_sharing_counts = {"http:\/\/ctszkin.com\/2013\/02\/12\/compute-the-self-excluded-sample-mean-by-group\/":138} jQuery(document).on( 'ready post-load', function(){ jQuery( 'a.share-twitter' ).on( 'click', function() { window.open( jQuery(this).attr( 'href' ), 'wpcomtwitter', 'menubar=1,resizable=1,width=600,height=350' ); return false; }); }); jQuery(document).on( 'ready post-load', function(){ jQuery( 'a.share-facebook' ).on( 'click', function() { window.open( jQuery(this).attr( 'href' ), 'wpcomfacebook', 'menubar=1,resizable=1,width=600,height=400' ); return false; }); }); %d bloggers like this: //<![CDATA[ var jetpackLikesWidgetQueue = []; var jetpackLikesWidgetBatch = []; var jetpackLikesMasterReady = false; function JetpackLikespostMessage( message, target ) { if ( "string" === typeof message ){ try{ message = JSON.parse( message ); } catch(e) { return; } } pm( { target: target, type: 'likesMessage', data: message, origin: '*' } ); } function JetpackLikesBatchHandler() { var requests = []; jQuery( 'div.jetpack-likes-widget-unloaded' ).each( function( i ) { if ( jetpackLikesWidgetBatch.indexOf( this.id ) > -1 ) return; jetpackLikesWidgetBatch.push( this.id ); var regex = /like-(post|comment)-wrapper-(\d+)-(\d+)-(\w+)/; var match = regex.exec( this.id ); if ( ! match || match.length != 5 ) return; var info = { blog_id: match[2], width: this.width }; if ( 'post' == match[1] ) { info.post_id = match[3]; } else if ( 'comment' == match[1] ) { info.comment_id = match[3]; } info.obj_id = match[4]; requests.push( info ); }); if ( requests.length > 0 ) { JetpackLikespostMessage( { event: 'initialBatch', requests: requests }, window.frames['likes-master'] ); } } function JetpackLikesMessageListener( event ) { if ( "undefined" == typeof event.event ) return; if ( 'masterReady' == event.event ) { jQuery( document ).ready( function() { jetpackLikesMasterReady = true; var stylesData = { event: 'injectStyles' }; if ( jQuery( 'iframe.admin-bar-likes-widget' ).length > 0 ) { JetpackLikespostMessage( { event: 'adminBarEnabled' }, window.frames[ 'likes-master' ] ); stylesData.adminBarStyles = { background: jQuery( '#wpadminbar .quicklinks li#wp-admin-bar-wpl-like > a' ).css( 'background' ) }; } if ( !window.addEventListener ) jQuery( '#wp-admin-bar-admin-bar-likes-widget' ).hide(); stylesData.textStyles = { color: jQuery( '.sd-text-color').css( 'color' ), fontFamily: jQuery( '.sd-text-color' ).css( 'font-family' ), fontSize: jQuery( '.sd-text-color' ).css( 'font-size' ), direction: jQuery( '.sd-text-color' ).css( 'direction' ), fontWeight: jQuery( '.sd-text-color' ).css( 'font-weight' ), fontStyle: jQuery( '.sd-text-color' ).css( 'font-style' ), textDecoration: jQuery( '.sd-text-color' ).css('text-decoration') }; stylesData.linkStyles = { color: jQuery( '.sd-link-color' ).css('color'), fontFamily: jQuery( '.sd-link-color' ).css('font-family'), fontSize: jQuery( '.sd-link-color' ).css('font-size'), textDecoration: jQuery( '.sd-link-color' ).css('text-decoration'), fontWeight: jQuery( '.sd-link-color' ).css( 'font-weight' ), fontStyle: jQuery( '.sd-link-color' ).css( 'font-style' ) }; JetpackLikespostMessage( stylesData, window.frames[ 'likes-master' ] ); JetpackLikesBatchHandler(); jQuery( document ).on( 'inview', 'div.jetpack-likes-widget-unloaded', function() { jetpackLikesWidgetQueue.push( this.id ); }); }); } if ( 'showLikeWidget' == event.event ) { jQuery( '#' + event.id + ' .post-likes-widget-placeholder' ).fadeOut( 'fast', function() { jQuery( '#' + event.id + ' .post-likes-widget' ).fadeIn( 'fast', function() { JetpackLikespostMessage( { event: 'likeWidgetDisplayed', blog_id: event.blog_id, post_id: event.post_id, obj_id: event.obj_id }, window.frames['likes-master'] ); }); }); } if ( 'showOtherGravatars' == event.event ) { var \$container = jQuery( '#likes-other-gravatars' ); var \$list = \$container.find( 'ul' ); \$container.hide(); \$list.html( '' ); \$container.find( '.likes-text span' ).text( event.total ); jQuery.each( event.likers, function( i, liker ) { \$list.append( '<li class="' + liker.css_class + '"><a href="' + liker.profile_URL + '" class="wpl-liker" rel="nofollow" target="_parent"><img src="' + liker.avatar_URL + '" alt="' + liker.name + '" width="30" height="30" style="padding-right: 3px;" /></a></li>'); } ); var offset = jQuery( "[name='" + event.parent + "']" ).offset(); \$container.css( 'left', offset.left + event.position.left - 10 + 'px' ); \$container.css( 'top', offset.top + event.position.top - 33 + 'px' ); var rowLength = Math.floor( event.width / 37 ); var height = ( Math.ceil( event.likers.length / rowLength ) * 37 ) + 13; if ( height > 204 ) { height = 204; } \$container.css( 'height', height + 'px' ); \$container.css( 'width', rowLength * 37 - 7 + 'px' ); \$list.css( 'width', rowLength * 37 + 'px' ); \$container.fadeIn( 'slow' ); var scrollbarWidth = \$list[0].offsetWidth - \$list[0].clientWidth; if ( scrollbarWidth > 0 ) { \$container.width( \$container.width() + scrollbarWidth ); \$list.width( \$list.width() + scrollbarWidth ); } } } pm.bind( 'likesMessage', function(e) { JetpackLikesMessageListener(e); } ); jQuery( document ).click( function( e ) { var \$container = jQuery( '#likes-other-gravatars' ); if ( \$container.has( e.target ).length === 0 ) { \$container.fadeOut( 'slow' ); } }); function JetpackLikesWidgetQueueHandler() { var wrapperID; if ( ! jetpackLikesMasterReady ) { setTimeout( JetpackLikesWidgetQueueHandler, 500 ); return; } if ( jetpackLikesWidgetQueue.length > 0 ) { // We may have a widget that needs creating now var found = false; while( jetpackLikesWidgetQueue.length > 0 ) { // Grab the first member of the queue that isn't already loading. wrapperID = jetpackLikesWidgetQueue.splice( 0, 1 )[0]; if ( jQuery( '#' + wrapperID ).hasClass( 'jetpack-likes-widget-unloaded' ) ) { found = true; break; } } if ( ! found ) { setTimeout( JetpackLikesWidgetQueueHandler, 500 ); return; } } else if ( jQuery( 'div.jetpack-likes-widget-unloaded' ).length > 0 ) { // Grab any unloaded widgets for a batch request JetpackLikesBatchHandler(); // Get the next unloaded widget wrapperID = jQuery( 'div.jetpack-likes-widget-unloaded' ).first()[0].id; if ( ! wrapperID ) { // Everything is currently loaded setTimeout( JetpackLikesWidgetQueueHandler, 500 ); return; } } if ( 'undefined' === typeof wrapperID ) { setTimeout( JetpackLikesWidgetQueueHandler, 500 ); return; } var \$wrapper = jQuery( '#' + wrapperID ); \$wrapper.find( 'iframe' ).remove(); if ( \$wrapper.hasClass( 'slim-likes-widget' ) ) { \$wrapper.find( '.post-likes-widget-placeholder' ).after( "<iframe class='post-likes-widget jetpack-likes-widget' name='" + \$wrapper.data( 'name' ) + "' height='22px' width='68px' frameBorder='0' scrolling='no' src='" + \$wrapper.data( 'src' ) + "'></iframe>" ); } else { \$wrapper.find( '.post-likes-widget-placeholder' ).after( "<iframe class='post-likes-widget jetpack-likes-widget' name='" + \$wrapper.data( 'name' ) + "' height='55px' width='100%' frameBorder='0' src='" + \$wrapper.data( 'src' ) + "'></iframe>" ); } \$wrapper.removeClass( 'jetpack-likes-widget-unloaded' ).addClass( 'jetpack-likes-widget-loading' ); \$wrapper.find( 'iframe' ).load( function( e ) { var \$iframe = jQuery( e.target ); \$wrapper.removeClass( 'jetpack-likes-widget-loading' ).addClass( 'jetpack-likes-widget-loaded' ); JetpackLikespostMessage( { event: 'loadLikeWidget', name: \$iframe.attr( 'name' ), width: \$iframe.width() }, window.frames[ 'likes-master' ] ); if ( \$wrapper.hasClass( 'slim-likes-widget' ) ) { \$wrapper.find( 'iframe' ).Jetpack( 'resizeable' ); } }); setTimeout( JetpackLikesWidgetQueueHandler, 250 ); } JetpackLikesWidgetQueueHandler(); //]]> (function(){ var corecss = document.createElement('link'); var themecss = document.createElement('link'); var corecssurl = "http://s0.wp.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shCore.css?m=1370811927g&amp;ver=3.0.83c"; if ( corecss.setAttribute ) { corecss.setAttribute( "rel", "stylesheet" ); corecss.setAttribute( "type", "text/css" ); corecss.setAttribute( "href", corecssurl ); } else { corecss.rel = "stylesheet"; corecss.href = corecssurl; } document.getElementsByTagName("head")[0].insertBefore( corecss, document.getElementById("syntaxhighlighteranchor") ); var themecssurl = "http://s0.wp.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shThemeDefault.css?m=1363304414g&amp;ver=3.0.83c"; if ( themecss.setAttribute ) { themecss.setAttribute( "rel", "stylesheet" ); themecss.setAttribute( "type", "text/css" ); themecss.setAttribute( "href", themecssurl ); } else { themecss.rel = "stylesheet"; themecss.href = themecssurl; } //document.getElementById("syntaxhighlighteranchor").appendChild(themecss); document.getElementsByTagName("head")[0].insertBefore( themecss, document.getElementById("syntaxhighlighteranchor") ); })(); SyntaxHighlighter.config.strings.expandSource = '+ expand source'; SyntaxHighlighter.config.strings.help = '?'; SyntaxHighlighter.config.strings.alert = 'SyntaxHighlighter\n\n'; SyntaxHighlighter.config.strings.noBrush = 'Can\'t find brush for: '; SyntaxHighlighter.config.strings.brushNotHtmlScript = 'Brush wasn\'t configured for html-script option: '; SyntaxHighlighter.defaults['pad-line-numbers'] = false; SyntaxHighlighter.defaults['toolbar'] = false; SyntaxHighlighter.all(); /* <![CDATA[ */ var recaptcha_options = {"lang":"en"}; /* ]]> */ // <![CDATA[ (function() { try{ if ( window.external &&'msIsSiteMode' in window.external) { if (window.external.msIsSiteMode()) { var jl = document.createElement('script'); jl.type='text/javascript'; jl.async=true; jl.src='/wp-content/plugins/ie-sitemode/custom-jumplist.php'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(jl, s); } } }catch(e){} })(); // ]]> st_go({'blog':'25621776','v':'wpcom','tz':'-5','user_id':'0','post':'138','subd':'rlearner'}); ex_go({'crypt':'UE5XaGUuOTlwaD85flAmcm1mcmZsaDhkV11YdWtpP0NsWnVkPS9sL0ViLndld3AlSGN8YmRCSmtFZTBZY2VYM18tRTc0R0Rhcm9Sd1p2YWQsPS5MSHltZnIzN25ifmlZanUmUD9pRGUubj9tWHF4d0FncmFLT0dHMHRWLGFlWFhKTTdsMUdRU2REcnxLVWZSLnpqazQsV0xlSHhWUVVfUk5+dldNL05HYWFZdStuWSZdMlhDRkRyUXM1P09YN1lGZDFbUEcuLW1PY2srL205WXBbdm9JUHZJTGlbL0lGSUQmVHNmbkVIN2I5cn4rWyxybzJwRkVQTkQyLlRkMno3OHI0PTFDLkdlaU9MTEx2ZTJ2XSV2fCVERXZ8LWM2bSZ3V3hjZiZ6dnxGNkYzPVgld04zemVvUzBuVXFtZGtBMkw3ZGlNOQ=='}); addLoadEvent(function(){linktracker_init('25621776',138);}); if ( 'object' === typeof wpcom_mobile_user_agent_info ) { wpcom_mobile_user_agent_info.init(); var mobileStatsQueryString = ""; if( false !== wpcom_mobile_user_agent_info.matchedPlatformName ) mobileStatsQueryString += "&x_" + 'mobile_platforms' + '=' + wpcom_mobile_user_agent_info.matchedPlatformName; if( false !== wpcom_mobile_user_agent_info.matchedUserAgentName ) mobileStatsQueryString += "&x_" + 'mobile_devices' + '=' + wpcom_mobile_user_agent_info.matchedUserAgentName; if( wpcom_mobile_user_agent_info.isIPad() ) mobileStatsQueryString += "&x_" + 'ipad_views' + '=' + 'views'; if( "" != mobileStatsQueryString ) { new Image().src = document.location.protocol + '//stats.wordpress.com/g.gif?v=wpcom-no-pv' + mobileStatsQueryString + '&baba=' + Math.random(); } } ```