<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>visualization on Ray Yang, Ph.D.</title>
    <link>https://yangphd.com/categories/visualization/</link>
    <description>Recent content in visualization on Ray Yang, Ph.D.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 19 Apr 2020 00:00:00 +0000</lastBuildDate>
    
        <atom:link href="https://yangphd.com/categories/visualization/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Tracking the Change of Industry Positioning Caused by an Acquisition</title>
      <link>https://yangphd.com/research/tracking-the-movement-of-industry-positioning-caused-by-an-acquisition/</link>
      <pubDate>Sun, 19 Apr 2020 00:00:00 +0000</pubDate>
      
      <guid>https://yangphd.com/research/tracking-the-movement-of-industry-positioning-caused-by-an-acquisition/</guid>
      <description>

&lt;div id=&#34;TOC&#34;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#motivation&#34;&gt;1. Motivation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#mapping-the-positioning-and-tracking-the-movement&#34;&gt;2. Mapping the Positioning and Tracking the Movement&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#the-biplot&#34;&gt;2.1 the Biplot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#the-3-d-and-2-d-scatterplots-based-on-mds&#34;&gt;2.2 the 3-D and 2-D Scatterplots based on MDS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;div id=&#34;motivation&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;1. Motivation&lt;/h1&gt;
&lt;p&gt;Due to enduring resource heterogeneity, firms tend to hold persistent positionings within an established industry (like commercial banking). However, transformative corporate actions may alter a firm’s asset structure and create a new industry for the acquirer. Thus, we can map out the industry positions and track the position change caused by an acquisition.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;mapping-the-positioning-and-tracking-the-movement&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;2. Mapping the Positioning and Tracking the Movement&lt;/h1&gt;
&lt;div id=&#34;the-biplot&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;2.1 the Biplot&lt;/h2&gt;
&lt;p&gt;Consider commercial banks as an example. Different banks may hold differently structured financial asset portfolios and occupy different positions. We can assess a bank’s position based on the proportion of cash, commercial loans, mortgage loans, etc., as a percentage in the total asset (i.e., multiple dimensions). A biplot can provide us a quick intuition about how those dimensions relate to one another. However, the relative positions shown on biplot would not be accurate due to the loss of information in dimension reduction.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/research/2020-04-19-tracking-the-movement-of-industry-positioning-caused-by-an-acquisition_files/figure-html/biplot.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;the-3-d-and-2-d-scatterplots-based-on-mds&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;2.2 the 3-D and 2-D Scatterplots based on MDS&lt;/h2&gt;
&lt;p&gt;In an alternative approach, we can build distance-based features by exploring the inter-firm distance using multi-dimensional scaling (MDS). On Feb. 12th, 2018, Pacific Premier Bancorp launched an acquisition of Grandpoint Capital. Using this acquisition event as an example, we can first calculate the interfirm distance using MDS and then track how the acquisition shifts a bank’s position (in both a 3-D and 2-D scatter plots).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/research/2020-04-19-tracking-the-movement-of-industry-positioning-caused-by-an-acquisition_files/figure-html/3d_scatterplot.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/research/2020-04-19-tracking-the-movement-of-industry-positioning-caused-by-an-acquisition_files/figure-html/2d_scatterplot.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>the Positionings of Big Tech Firms on Industry Presence and Competition Description</title>
      <link>https://yangphd.com/research/mapping-out-the-positionings-of-public-tech-firms-based-on-industry-participation/</link>
      <pubDate>Thu, 16 Apr 2020 00:00:00 +0000</pubDate>
      
      <guid>https://yangphd.com/research/mapping-out-the-positionings-of-public-tech-firms-based-on-industry-participation/</guid>
      <description>

&lt;div id=&#34;TOC&#34;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#the-positioning-by-industry-presence-across-sic-categories&#34;&gt;1 the positioning by industry presence across SIC categories&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#the-positioning-by-competition-description-in-10-k-filing&#34;&gt;2 the positioning by competition description in 10-K filing&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#calculating-positioning-based-on-the-competition-description&#34;&gt;2.1 calculating positioning based on the competition description&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#the-final-result-positioning-by-competition-description&#34;&gt;2.2 the final result: positioning by competition description&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;In this post, I calculated the positioning of big tech firms based on two metrics, the multiple-industry presence (based on 3-digit SIC codes) versus the competition description (in 10-K filings), and compared the difference between the two approaches.&lt;/p&gt;
&lt;div id=&#34;the-positioning-by-industry-presence-across-sic-categories&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;1 the positioning by industry presence across SIC categories&lt;/h1&gt;
&lt;p&gt;Scholars have used SIC codes to understand interfirm differences &lt;a href=&#34;#fn1&#34; class=&#34;footnote-ref&#34; id=&#34;fnref1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;
Big public firms typically straddle across multiple SIC industry categories. So it is straightforward and easy to see their positionings by multiple-industry participation. Accordingly, a firm’s position can be calculated as the sales distribution across multiple SIC industry categories &lt;a href=&#34;#fn2&#34; class=&#34;footnote-ref&#34; id=&#34;fnref2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041620_big_firm_industry_competition/positioning_multi_industry_presence.png&#34; alt=&#34;positioning by multi-industry presence&#34;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;the-positioning-by-competition-description-in-10-k-filing&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;2 the positioning by competition description in 10-K filing&lt;/h1&gt;
&lt;p&gt;The SIC-code might be “backward-looking,” as firms tend to quite if particular combinations of multiple-industry business lines create economic inefficiencies. Only efficient multi-industry presence survives.&lt;/p&gt;
&lt;p&gt;In contrast, the SEC filings may reflect managers’ current understanding of what they do. Especially when they characterize their competition, managers tend to draw their forward-looking expectations on the various forms of competitive threats. Some scholars&lt;a href=&#34;#fn3&#34; class=&#34;footnote-ref&#34; id=&#34;fnref3&#34;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt; and companies&lt;a href=&#34;#fn4&#34; class=&#34;footnote-ref&#34; id=&#34;fnref4&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt; have used the text-based approach to calculate inter-industry distance.&lt;/p&gt;
&lt;div id=&#34;calculating-positioning-based-on-the-competition-description&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;2.1 calculating positioning based on the competition description&lt;/h2&gt;
&lt;p&gt;I collected the competition description texts of the largest 17 tech companies. Below are some frequently used words in those statements.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041620_big_firm_industry_competition/word_cloud_competition_description.png&#34; alt=&#34;word cloud competition description&#34;&gt;&lt;/p&gt;
&lt;p&gt;I ran an LDA topic modeling with 11 latent topics, which yields a low perplexity score.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041620_big_firm_industry_competition/perplecity_score_topic_competition_description.png&#34; alt=&#34;perplecity score topic model on competition description&#34;&gt;&lt;/p&gt;
&lt;p&gt;The figure below shows how the 11 topics distribute across terms.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041620_big_firm_industry_competition/topic_loading_on_words.png&#34; alt=&#34;topic loading on terms.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;This is the topic loading on the 11 firms’ competition description, which is used to calculate the pairwise distance.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041620_big_firm_industry_competition/topic_loading_on_companies.png&#34; alt=&#34;topic loading on companies.png&#34;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;the-final-result-positioning-by-competition-description&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;2.2 the final result: positioning by competition description&lt;/h2&gt;
&lt;p&gt;Here is the positioning map based on the competition description. The graph on the right shows the positioning of American companies. Looking at the results, we can see some interesting differences. The competition description moves some firms closer or further away from one another as compared to the SIC-presence positioning map.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041620_big_firm_industry_competition/positioning_based_on_competition_description.png&#34; alt=&#34;positioning based on competition description.png&#34;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li id=&#34;fn1&#34;&gt;&lt;p&gt;for example: &lt;br&gt;Teece, D. J., Rumelt, R., Dosi, G., &amp;amp; Winter, S. (1994). Understanding corporate coherence: Theory and evidence. Journal of economic behavior &amp;amp; organization, 23(1), 1-30.&lt;br&gt;
&lt;br&gt;Lien, L. B., &amp;amp; Klein, P. G. (2013). Can the survivor principle survive diversification?. Organization Science, 24(5), 1478-1494.&lt;br&gt;&lt;a href=&#34;#fnref1&#34; class=&#34;footnote-back&#34;&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li id=&#34;fn2&#34;&gt;&lt;p&gt;Litov, L. P., Moreton, P., &amp;amp; Zenger, T. R. (2012). Corporate strategy, analyst coverage, and the uniqueness paradox. Management Science, 58(10), 1797-1815.Lien, L. B., &amp;amp; Klein, P. G. (2013).&lt;a href=&#34;#fnref2&#34; class=&#34;footnote-back&#34;&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li id=&#34;fn3&#34;&gt;&lt;p&gt;&lt;a href=&#34;https://hobergphillips.tuck.dartmouth.edu&#34; class=&#34;uri&#34;&gt;https://hobergphillips.tuck.dartmouth.edu&lt;/a&gt;&lt;a href=&#34;#fnref3&#34; class=&#34;footnote-back&#34;&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li id=&#34;fn4&#34;&gt;&lt;p&gt;&lt;a href=&#34;https://www.google.com/search?&amp;q=+Rethinking+Comparable+Companies+Morningstar&#34;&gt;Morningstart’s Company Comparables System&lt;/a&gt;&lt;a href=&#34;#fnref4&#34; class=&#34;footnote-back&#34;&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Mapping Twitter Topics and Sentiment about FAAMG Companies since Covid-19 Outbreak</title>
      <link>https://yangphd.com/research/mapping-covid-19-related-latent-topics-and-sentiment-on-twitter-about-faamg-the-top-tech-companies/</link>
      <pubDate>Wed, 15 Apr 2020 00:00:00 +0000</pubDate>
      
      <guid>https://yangphd.com/research/mapping-covid-19-related-latent-topics-and-sentiment-on-twitter-about-faamg-the-top-tech-companies/</guid>
      <description>

&lt;div id=&#34;TOC&#34;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#motivation&#34;&gt;1 Motivation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#procedures&#34;&gt;2 Procedures&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#data-source&#34;&gt;2.1 Data Source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#topic-modeling&#34;&gt;2.2 Topic Modeling&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#results&#34;&gt;3 Results&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#perceptual-map-of-faamg-based-on-topic-sentiment&#34;&gt;3.1 Perceptual Map of FAAMG Based on Topic Sentiment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#keywords-co-occurrence-network-on-each-topic&#34;&gt;3.2 Keywords Co-occurrence Network on Each Topic&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;div id=&#34;motivation&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;1 Motivation&lt;/h1&gt;
&lt;p&gt;On a whim, I mapped out what people say (the text) and feel (the sentiment) about the top tech companies (FAAMG) on twitter since the Covid-19 outbreak. The keywords and sentiment that are associated with the main topics should differ across these companies.&lt;/p&gt;
&lt;p&gt;By no means I am drawing any causal association here. But the story starts with checking the recent price movements of the FAAMG stocks. Obviously, Covid-19 has impacted these companies quite differently.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041520_FAAMG_twitter_topic_sentiment/stock_price_FAAMG.png&#34; alt=&#34;FAAMG stock price&#34;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;procedures&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;2 Procedures&lt;/h1&gt;
&lt;div id=&#34;data-source&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;2.1 Data Source&lt;/h2&gt;
&lt;p&gt;For each company, I downloaded 1,000 tweets containing the company name as the hashtag (e.g. “#amazon” for Amazon).
I used Python module “tweepy” to stream the data and set the “since” parameter to ‘2020-03-01’, which collects a sample of 1,000 tweets since March 1st.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;topic-modeling&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;2.2 Topic Modeling&lt;/h2&gt;
&lt;p&gt;Using Python module “gensim”, I detected three most significant topics (including Covid-19, business, and daily life), which are named by the associated keywords (most relevant terms).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041520_FAAMG_twitter_topic_sentiment/lda.png&#34; alt=&#34;latent topics and revevant terms&#34;&gt;&lt;/p&gt;
&lt;p&gt;Using Python module “vaderSentiment”, I computed sentiment scores for each tweet and aggregated the scores by company. The topic-based sentiment scores are used to construct the perceptual map, in which each company takes a different position.
Using Python module “nltk”, I find the most frequent topic-based co-occurring words for each company.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;results&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;3 Results&lt;/h1&gt;
&lt;div id=&#34;perceptual-map-of-faamg-based-on-topic-sentiment&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;3.1 Perceptual Map of FAAMG Based on Topic Sentiment&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041520_FAAMG_twitter_topic_sentiment/topic_sentiment_FAAMG.png&#34; alt=&#34;perceptual map and the positioning of each company&#34;&gt;&lt;/p&gt;
&lt;p&gt;It looks Amazon does well on all topics, especially on Covid-19-related topic. Microsoft and Apple do well on “Business”.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;keywords-co-occurrence-network-on-each-topic&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;3.2 Keywords Co-occurrence Network on Each Topic&lt;/h2&gt;
&lt;p&gt;Here are the work keywords co-occurrence patterns for each topic of these companies.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041520_FAAMG_twitter_topic_sentiment/topic_keyword_amazon.png&#34; alt=&#34;Amazon Word-Association Network&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041520_FAAMG_twitter_topic_sentiment/topic_keyword_apple.png&#34; alt=&#34;Apple Word-Association Network&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041520_FAAMG_twitter_topic_sentiment/topic_keyword_facebook.png&#34; alt=&#34;Facebook Word-Association Network&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041520_FAAMG_twitter_topic_sentiment/topic_keyword_google.png&#34; alt=&#34;Google Word-Association Network&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/opinion_mining/041520_FAAMG_twitter_topic_sentiment/topic_keyword_microsoft.png&#34; alt=&#34;Microsoft Word-Association Network&#34;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>“MMeM”: Modeling the Multivariate Mixed-effects</title>
      <link>https://yangphd.com/post/2019/03/10/mmem-an-r-package/</link>
      <pubDate>Sun, 10 Mar 2019 00:00:00 +0000</pubDate>
      
      <guid>https://yangphd.com/post/2019/03/10/mmem-an-r-package/</guid>
      <description>

&lt;div id=&#34;TOC&#34;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#statistical-intuition&#34;&gt;Statistical Intuition&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#the-univariate-mixed-effects-model&#34;&gt;The univariate mixed-effects model&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#the-multivariate-mixed-effects-model&#34;&gt;The multivariate mixed-effects model&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#an-implementation-example&#34;&gt;An Implementation Example&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#initialization&#34;&gt;Initialization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#estimation&#34;&gt;Estimation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;I co-developed an R pakcage &lt;a href=&#34;https://CRAN.R-project.org/package=MMeM&#34; target=&#34;_blank&#34;&gt; “MMeM”&lt;/a&gt; for estimating the variance-covariance matrix of random effects &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{u}\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{e}\)&lt;/span&gt; on multiple dependent variables.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://cran.r-project.org/package=MMeM&#34;&gt;&lt;img src=&#34;https://cranlogs.r-pkg.org/badges/MMeM&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div id=&#34;statistical-intuition&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Statistical Intuition&lt;/h1&gt;
&lt;div id=&#34;the-univariate-mixed-effects-model&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;The univariate mixed-effects model&lt;/h2&gt;
&lt;p&gt;In univariate mixed-effects model: &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{y} = \mathbf{Xb} + \mathbf{Zu} + \mathbf{e}\)&lt;/span&gt; (1), we estimate the variance component &lt;span class=&#34;math inline&#34;&gt;\(\sigma_u^2\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\sigma_e^2\)&lt;/span&gt; for &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{u} \sim N(\mathbf{0}, \sigma_u^2\mathbf{I})\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{e} \sim N(\mathbf{0}, \sigma_e^2\mathbf{I})\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;In formula (1):
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{y}\)&lt;/span&gt; is n &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; 1 response vector;
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{X}\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{Z}\)&lt;/span&gt; are n &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; p and n &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; s;
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{b}\)&lt;/span&gt; is p &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; 1 coefficients vector for the fixed effects;
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{u}\)&lt;/span&gt; is s &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; 1 matrix for the random effects,
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{e}\)&lt;/span&gt; is n &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; 1 vector of random errors.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;the-multivariate-mixed-effects-model&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;The multivariate mixed-effects model&lt;/h2&gt;
&lt;p&gt;In multivariate mixed-effects model: &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{y} = (\mathbf{I} \otimes \mathbf{X})\mathbf{b} + (\mathbf{I} \otimes \mathbf{Z} )\mathbf{u} + \mathbf{e}\)&lt;/span&gt; (2), in which &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{y} = \left\{\mathbf{y}_i\right\}_c, \mathbf{b} = \left\{\mathbf{b}_i\right\}_c, \mathbf{u} = \left\{\mathbf{u}_i\right\}_c, \mathbf{e} = \left\{\mathbf{e}_i\right\}_c, i =1, \dots, q\)&lt;/span&gt;, we estimate the variance-covariance matrix of random effects &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{u}\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{e}\)&lt;/span&gt; on &lt;span class=&#34;math inline&#34;&gt;\(q\)&lt;/span&gt; response variates, namely &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{T}\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\mathbf{E}\)&lt;/span&gt;, for
&lt;span class=&#34;math inline&#34;&gt;\(var(\mathbf{u}) = \mathbf{G} = \mathbf{T}\otimes \mathbf{I}_s, var(\mathbf{e}) = \mathbf{R} = \mathbf{E} \otimes \mathbf{I}_n, var(\mathbf{y}) = \mathbf{V} = \mathbf{T}\otimes \mathbf{ZZ}&amp;#39; + \mathbf{E} \otimes \mathbf{I}_n\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;In formula (2):
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{y}\)&lt;/span&gt; is n&lt;em&gt;q &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; 1 response vector;
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{X}\)&lt;/span&gt; is n &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; p design matrix for the fixed effects;
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{b}\)&lt;/span&gt; is p&lt;/em&gt;q &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; 1 coefficients vector for the fixed effects;
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{Z}\)&lt;/span&gt; is n &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; s design matrix for the random effects;
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{u}\)&lt;/span&gt; is s&lt;em&gt;q &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; 1 vector of the random effects;
&lt;span class=&#34;math inline&#34;&gt;\(\mathbf{e}\)&lt;/span&gt; is n&lt;/em&gt;q &lt;span class=&#34;math inline&#34;&gt;\(\times\)&lt;/span&gt; 1 vector of random errors.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;an-implementation-example&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;An Implementation Example&lt;/h1&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# install.packages(&amp;quot;MMeM&amp;quot;)
library(MMeM)
data(simdata)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;initialization&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Initialization&lt;/h2&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# initialize with a positive-definiate var-cov
T.start = matrix(c(10, 5, 5, 15), 2, 2)
E.start = matrix(c(10, 1, 1, 3), 2, 2)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;estimation&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Estimation&lt;/h2&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# using the Henderson3 estimation mothod
results_henderson = MMeM_henderson3(fml = c(V1,V2) ~ X_vec + (1|Z_vec), data = simdata, factor_X = TRUE)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## Bivariate response: V1 and V2&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;print(results_henderson)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## $T.estimates
##                 T: V1   T: V1 V2     T: V2
## T.estimates  65.47395   9.969188  9.766204
## T.variance  807.56303 128.824836 20.552160
## 
## $E.estimates
##                E: V1  E: V1 V2     E: V2
## E.estimates 55.74506 11.477502 41.171927
## E.variance  11.09826  8.196899  6.054027&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>“regrrr”: One-stop R-toolkit for Compiling Regression Results</title>
      <link>https://yangphd.com/post/2019/03/06/regrrr-released-compiling-regression-results/</link>
      <pubDate>Wed, 06 Mar 2019 00:00:00 +0000</pubDate>
      
      <guid>https://yangphd.com/post/2019/03/06/regrrr-released-compiling-regression-results/</guid>
      <description>

&lt;div id=&#34;TOC&#34;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#installation&#34;&gt;Installation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#examples&#34;&gt;Examples&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#compile-the-correlation-table&#34;&gt;compile the correlation table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#compile-the-regression-table&#34;&gt;compile the regression table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#plot-the-moderating-effect&#34;&gt;plot the moderating effect&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#plot-the-moderating-effect-with-a-linear-spline&#34;&gt;plot the moderating effect with a linear spline&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;In strategy/management research, we always need to compile the regression results into the publishable format and sometimes plot the moderating effects. Thus, I developed this &lt;a href=&#34;https://CRAN.R-project.org/package=regrrr&#34; target=&#34;_blank&#34;&gt;“regrrr”&lt;/a&gt; package &lt;a href=&#34;https://cran.r-project.org/package=regrrr&#34;&gt;&lt;img src=&#34;https://cranlogs.r-pkg.org/badges/regrrr&#34; /&gt;&lt;/a&gt; to help do the job.&lt;/p&gt;
&lt;p&gt;Here is the quickstart guide.&lt;/p&gt;
&lt;!-- [![Rdoc](http://www.rdocumentation.org/badges/version/regrrr)](http://www.rdocumentation.org/packages/regrrr) --&gt;
&lt;!-- &lt;a href=&#34;https://www.rdocumentation.org/packages/regrrr/versions/0.1.1&#34; target=&#34;_blank&#34;&gt;package&lt;/a&gt; --&gt;
&lt;div id=&#34;installation&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Installation&lt;/h1&gt;
&lt;p&gt;To install from CRAN:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;install.packages(&amp;quot;regrrr&amp;quot;)
library(regrrr)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can also use devtools to install the latest development version:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;devtools::install_github(&amp;quot;raykyang/regrrr&amp;quot;)
library(regrrr)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;examples&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Examples&lt;/h1&gt;
&lt;div id=&#34;compile-the-correlation-table&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;compile the correlation table&lt;/h2&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(regrrr)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## Registered S3 methods overwritten by &amp;#39;tibble&amp;#39;:
##   method     from  
##   format.tbl pillar
##   print.tbl  pillar&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;data(mtcars)
m0 &amp;lt;- lm(mpg ~ vs + carb + hp + wt, data = mtcars)
m1 &amp;lt;- update(m0, . ~ . + wt * hp)
m2 &amp;lt;- update(m1, . ~ . + wt * vs)
cor.table(data = m2$model)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##          Mean  S.D.     1     2    3    4    5
## 1.mpg   20.09  6.03  1.00                     
## 2.vs     0.44  0.50  0.66  1.00               
## 3.carb   2.81  1.62 -0.55 -0.57 1.00          
## 4.hp   146.69 68.56 -0.78 -0.72 0.75 1.00     
## 5.wt     3.22  0.98 -0.87 -0.55 0.43 0.66 1.00&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;compile-the-regression-table&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;compile the regression table&lt;/h2&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;regression_table &amp;lt;- rbind(
combine_long_tab(to_long_tab(summary(m0)$coef),
                 to_long_tab(summary(m1)$coef),
                 to_long_tab(summary(m2)$coef)),
compare_models(m0, m1, m2))
rownames(regression_table) &amp;lt;- NULL
print(regression_table)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##        Variables   Model 0   Model 1   Model 2
## 1    (Intercept) 35.435*** 48.157*** 46.698***
## 2                  (2.503)   (4.097)   (9.272)
## 3             vs     1.353     1.077     2.171
## 4                  (1.382)   (1.152)   (6.320)
## 5           carb    -0.057    -0.043    -0.009
## 6                  (0.449)   (0.374)   (0.426)
## 7             hp   -0.024† -0.113***   -0.107*
## 8                  (0.014)   (0.027)   (0.044)
## 9             wt -3.792*** -8.071***   -7.594*
## 10                 (0.658)   (1.307)   (3.016)
## 11         hp:wt             0.027**    0.025†
## 12                           (0.008)   (0.015)
## 13         vs:wt                        -0.367
## 14                                     (2.081)
## 15     R_squared     0.833     0.889     0.889
## 16 Adj_R_squared     0.808     0.867     0.862
## 17       Delta_F            12.517**     0.031&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;plot-the-moderating-effect&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;plot the moderating effect&lt;/h2&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;plot_effect(reg.coef = summary(m2)$coefficients, data = mtcars, model = m2,
            x_var.name = &amp;quot;wt&amp;quot;, y_var.name = &amp;quot;mpg&amp;quot;, moderator.name = &amp;quot;hp&amp;quot;,
            confidence_interval = TRUE,  CI_Ribbon = FALSE, 
            xlab = &amp;quot;Weight&amp;quot;, ylab = &amp;quot;MPG&amp;quot;, moderator.lab = &amp;quot;Horsepower&amp;quot;) +
ggplot2::theme(text=ggplot2::element_text(family=&amp;quot;Times New Roman&amp;quot;, size = 16))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/post/2019-03-06-regrrr-released-compiling-regression-results_files/figure-html/unnamed-chunk-3-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;plot-the-moderating-effect-with-a-linear-spline&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;plot the moderating effect with a linear spline&lt;/h2&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(lspline)
data(mtcars)
m3 &amp;lt;- lm(mpg ~ vs + carb + hp + lspline(wt, knots = 4, marginal = FALSE) * hp, data = mtcars)
plot_effect(reg.coef=summary(m3)$coefficients, data = mtcars, model = m3, 
            x_var.name = &amp;quot;wt&amp;quot;, y_var.name = &amp;quot;mpg&amp;quot;, moderator.name = &amp;quot;hp&amp;quot;,
            xlab=&amp;quot;Weight&amp;quot;, ylab=&amp;quot;MPG&amp;quot;, moderator.lab=&amp;quot;Horsepower&amp;quot;) +
ggplot2::theme(text=ggplot2::element_text(family=&amp;quot;Times New Roman&amp;quot;, size = 16))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/post/2019-03-06-regrrr-released-compiling-regression-results_files/figure-html/unnamed-chunk-4-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;As we can see from the last line of code, the plot is customizable using &lt;a href=&#34;https://CRAN.R-project.org/package=ggplot2&#34; target=&#34;_blank&#34;&gt;“ggplot2”&lt;/a&gt;. There are a couple of other functions. Please see the &lt;a href=&#34;https://www.rdocumentation.org/packages/regrrr&#34; target=&#34;_blank&#34;&gt;reference manual on R documentation&lt;/a&gt; for details.&lt;/p&gt;
&lt;p&gt;I’m also aiming to expand the package’s usage around its core functions. If you have any ideas or want to report a bug, please contact me or suggest on the &lt;a href=&#34;https://github.com/RayKYang/regrrr&#34; target=&#34;_blank&#34;&gt; GitHub&lt;/a&gt; page.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>A Quick Bibliometric Analysis on “Positioning”</title>
      <link>https://yangphd.com/post/2019/02/26/a-quick-bibliometric-analysis-on-strategic-positioning/</link>
      <pubDate>Tue, 26 Feb 2019 00:00:00 +0000</pubDate>
      
      <guid>https://yangphd.com/post/2019/02/26/a-quick-bibliometric-analysis-on-strategic-positioning/</guid>
      <description>


&lt;p&gt;I had a whim and wanted to do some quick bibliometric analysis on the topic of “strategic positioning”.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://github.com/RkzYang/Lit_Review/blob/master/data/savedrecs_02262019.txt&#34; target=&#34;_blank&#34;&gt; raw data&lt;/a&gt; is extracted from &lt;a href=&#34;http://www.webofknowledge.com&#34; target=&#34;_blank&#34;&gt; Web of Science&lt;/a&gt;.
The search parameters:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;TITLE: (&amp;quot;strategic positioning&amp;quot; OR &amp;quot;industry positioning&amp;quot; OR &amp;quot;market positioning&amp;quot;)
Refined by: WEB OF SCIENCE CATEGORIES: ( MANAGEMENT OR BUSINESS OR ECONOMICS ) AND WEB OF SCIENCE CATEGORIES: ( MANAGEMENT OR BUSINESS OR INTERNATIONAL RELATIONS OR ECONOMICS ) AND DOCUMENT TYPES: ( ARTICLE ) AND LANGUAGES: ( ENGLISH )
Timespan: All years. 
Indexes: SCI-EXPANDED, SSCI, A&amp;amp;HCI, CPCI-S, CPCI-SSH, BKCI-S, BKCI-SSH, ESCI, CCR-EXPANDED, IC.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I used the R package &lt;a href=&#34;http://www.bibliometrix.org&#34; target=&#34;_blank&#34;&gt; “bibliometrix”&lt;/a&gt; to conduct (1) “bibliographic coupling” and (2) “co-citation” analysis.&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;Bibliographic coupling analysis allows us to explore the “confluence and interactions” among recent papers. Two articles are bibliographically coupled if they co-cited at least one article.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/post/2019-02-26-a-rough-bibliometric-analysis-on-strategic-positioning_files/figure-html/unnamed-chunk-2-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;ol start=&#34;2&#34; style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;Co-citation analysis allows us to trace back to the origin of thoughts and classic papers. Two articles have a co-citation tie if they are both cited in a third article.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&#34;https://yangphd.com/post/2019-02-26-a-rough-bibliometric-analysis-on-strategic-positioning_files/figure-html/unnamed-chunk-3-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Reference:&lt;/p&gt;
&lt;p&gt;Aria, M. &amp;amp; Cuccurullo, C. (2017) bibliometrix: An R-tool for comprehensive science mapping analysis, Journal of Informetrics, 11(4), pp 959-975, Elsevier.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>