<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Marketing Research Methods | Chen Xing</title>
    <link>https://chenxing.space/category/marketing-research-methods/</link>
      <atom:link href="https://chenxing.space/category/marketing-research-methods/index.xml" rel="self" type="application/rss+xml" />
    <description>Marketing Research Methods</description>
    <generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Wed, 28 May 2025 00:00:00 +0000</lastBuildDate>
    <image>
      <url>https://chenxing.space/media/sharing.png</url>
      <title>Marketing Research Methods</title>
      <link>https://chenxing.space/category/marketing-research-methods/</link>
    </image>
    
    <item>
      <title>Notes on Unobserved Heterogeneity</title>
      <link>https://chenxing.space/blog/notes-on-unobserved-heterogeneity/</link>
      <pubDate>Wed, 28 May 2025 00:00:00 +0000</pubDate>
      <guid>https://chenxing.space/blog/notes-on-unobserved-heterogeneity/</guid>
      <description>&lt;p&gt;In quantitative marketing, &lt;strong&gt;unobserved heterogeneity&lt;/strong&gt; refers to differences in consumer response parameters that cannot be explained by observed demographics or past behavior.  Modeling this form of heterogeneity is crucial for uncovering true segmentation, avoiding bias from aggregation, and capturing variation in decision rules across consumers.&lt;/p&gt;
&lt;p&gt;I recommend to review Rossi and Allenby (2003) paper first to get a big picture.&lt;/p&gt;
&lt;h2 id=&#34;1-latent-class-finite-mixture-models&#34;&gt;1. Latent-Class (Finite Mixture) Models&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Motivation &amp;amp; Intuition&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Consumers naturally cluster into a &lt;strong&gt;finite&lt;/strong&gt; number of segments, each with its own set of brand-choice parameters (e.g., price sensitivity, loyalty effects).&lt;/li&gt;
&lt;li&gt;Rather than forcing all consumers into a single “average” model, a latent-class approach lets the data “discover” these segments.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Technical Details&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Assume $S$ segments; for individual $h$ we observe choice history $Y_h$.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Segment membership is unobserved; let $\pi_s = \Pr(\text{segment}=s)$.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The likelihood for consumer $h$ is&lt;/p&gt;
&lt;p&gt;$$
L_h=\sum_{s=1}^S \pi_s P\left(Y_h \mid \theta_s\right)
$$&lt;/p&gt;
&lt;p&gt;where $\theta_s$ are class-specific parameters (e.g., logit coefficients).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Parameters ${\pi_s,\theta_s}$ are estimated by maximum-likelihood via the EM algorithm.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Applications show latent classes revealing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Differences in brand loyalty and switching patterns (Grover &amp;amp; Srinivasan, 1987; Kamakura &amp;amp; Russell, 1989)&lt;/li&gt;
&lt;li&gt;Correcting spurious state-dependence by attributing inertia to heterogeneity rather than to true carryover effects .&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2-choice-process-heterogeneity&#34;&gt;2. Choice-Process Heterogeneity&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Motivation &amp;amp; Intuition&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Not only can parameters vary, but the &lt;strong&gt;decision rule&lt;/strong&gt; itself may differ: some consumers use a simple logit, others a nested-logit (planning vs. impulse), some apply conjunctive screening rules, etc.&lt;/li&gt;
&lt;li&gt;Capturing this heterogeneity helps explain why consumers respond differently under the same marketing stimuli.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Technical Details&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extend the latent-class framework so that each class $s$ has its own choice model form $f_s(\cdot)$ and parameters $\theta_s$.&lt;/li&gt;
&lt;li&gt;Likelihood remains a mixture, but with varying functional forms across $s$.&lt;/li&gt;
&lt;li&gt;Example: planners vs. non-planners found via nested-logit segments (Bucklin &amp;amp; Lattin, 1991); conjunctive/disjunctive screening via Bayesian mixtures (Gilbride &amp;amp; Allenby, 2004) .&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;3-continuous-random-coefficients-models&#34;&gt;3. Continuous (Random-Coefficients) Models&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Motivation &amp;amp; Intuition&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rather than a few discrete segments, allow each consumer to have their own parameter vector drawn from a continuous distribution (e.g. multivariate normal).&lt;/li&gt;
&lt;li&gt;This approach approximates an “infinite” mixture, capturing subtle, smooth variation across individuals.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Technical Details&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For consumer $h$, coefficients $\beta_h$ are drawn from density $g(\beta\mid\mu,\Sigma)$.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The (aggregate) choice probability is&lt;/p&gt;
&lt;p&gt;$$
P(i \mid X)=\int P(i \mid X, \beta) g(\beta \mid \mu, \Sigma) d \beta
$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Because this integral has no closed form, estimation uses:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Maximum Simulated Likelihood&lt;/strong&gt; (Train, 2003): draw $R$ samples ${\beta_h^{(r)}}$ and approximate the integral by averaging.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hierarchical Bayes / MCMC&lt;/strong&gt; (Allenby &amp;amp; Rossi, 1999): embed ${\beta_h}$ in a Bayesian hierarchy and sample via Gibbs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;These models uncover individual-level sensitivities and allow richer counterfactual simulation .&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;why-it-matters&#34;&gt;Why It Matters&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Bias Reduction&lt;/strong&gt;: Ignoring unobserved heterogeneity can bias estimates of price elasticity, advertising effects, and promotion lift.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Targeting &amp;amp; Personalization&lt;/strong&gt;: Knowing individual or segment-level parameters enables more precise targeting and budget allocation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Behavioral Insights&lt;/strong&gt;: Distinguishing between true state dependence and mere heterogeneity clarifies how loyalty and variety-seeking operate in the market.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;decision-checklist&#34;&gt;Decision Checklist&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Segmentation vs. Continuum?&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;If you want a handful of clear segments → &lt;strong&gt;latent-class&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;If you need a full spectrum of individual differences → &lt;strong&gt;continuous&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Behavioral Rules?&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;If process form itself may differ → &lt;strong&gt;choice-process heterogeneity&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sample Size &amp;amp; Resources?&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Small/moderate sample, limited compute → &lt;strong&gt;latent-class&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Large data, strong hardware, need fine granularity → &lt;strong&gt;random-coefficients&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interpretability vs. Flexibility?&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Prioritize interpretability and simplicity → &lt;strong&gt;latent-class&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Prioritize model realism and nuance → &lt;strong&gt;continuous&lt;/strong&gt; (or hybrid latent-class + continuous).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;reference&#34;&gt;Reference&lt;/h2&gt;
&lt;p&gt;Rossi, Peter E. and Greg M. Allenby (2003), “Bayesian Statistics and Marketing,” &lt;i&gt;Marketing Science&lt;/i&gt;, 22 (3), 304–28.the history of marketing science&lt;/p&gt;
&lt;p&gt;Winer, R. S., &amp;amp; Neslin, S. A. (2023). History Of Marketing Science, The (Second Edition). World Scientific.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Enhancing Statistical Power In Marketing Experiments — A Practical Implementation Guide</title>
      <link>https://chenxing.space/blog/enhancing-statistical-power-in-marketing-experiments-a-practical-implementation-guide/</link>
      <pubDate>Mon, 05 May 2025 00:00:00 +0000</pubDate>
      <guid>https://chenxing.space/blog/enhancing-statistical-power-in-marketing-experiments-a-practical-implementation-guide/</guid>
      <description>&lt;h2 id=&#34;1-introduction&#34;&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;This guide provides practical techniques for increasing the statistical power of marketing experiments without relying solely on large sample sizes. Based on Meyvis and van Osselaer&amp;rsquo;s work (2018), these methods enable researchers to detect subtle marketing effects with feasible sample sizes by increasing observed effect sizes through proper design and analysis decisions.&lt;/p&gt;
&lt;h2 id=&#34;2-essential-tools-and-resources&#34;&gt;2. Essential Tools And Resources&lt;/h2&gt;
&lt;h3 id=&#34;required-tools&#34;&gt;Required Tools:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Statistical software (R, SPSS, Stata)&lt;/li&gt;
&lt;li&gt;Survey platforms (Qualtrics, SurveyMonkey)&lt;/li&gt;
&lt;li&gt;Pre-registration platforms (OSF, AsPredicted.org)&lt;/li&gt;
&lt;li&gt;Data visualization tools&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;required-planning-elements&#34;&gt;Required Planning Elements:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Clearly defined hypotheses&lt;/li&gt;
&lt;li&gt;Detailed experimental designs&lt;/li&gt;
&lt;li&gt;Predetermined analysis plans&lt;/li&gt;
&lt;li&gt;Transparency protocols&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;3-pre-study-protocol&#34;&gt;3. Pre-Study Protocol&lt;/h2&gt;
&lt;h3 id=&#34;pre-registration-process&#34;&gt;Pre-Registration Process:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Define your research question with specificity&lt;/li&gt;
&lt;li&gt;Develop theory-based, testable hypotheses&lt;/li&gt;
&lt;li&gt;Determine all analyses before data collection&lt;/li&gt;
&lt;li&gt;Establish participant exclusion criteria&lt;/li&gt;
&lt;li&gt;Justify sample size using power analysis&lt;/li&gt;
&lt;li&gt;Document all decisions on a pre-registration platform&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Key Implementation Step&lt;/strong&gt;: Create a comprehensive pre-registration document that includes all exclusion criteria, covariates, and analysis plans before collecting any data.&lt;/p&gt;
&lt;h2 id=&#34;4-experimental-design-techniques&#34;&gt;4. Experimental Design Techniques&lt;/h2&gt;
&lt;h3 id=&#34;41-within-subjects-design-implementation&#34;&gt;4.1 Within-Subjects Design Implementation:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Have each participant experience all experimental conditions&lt;/li&gt;
&lt;li&gt;Counterbalance condition order systematically&lt;/li&gt;
&lt;li&gt;Include buffer tasks between conditions to reduce carryover&lt;/li&gt;
&lt;li&gt;Vary stimuli on multiple dimensions to reduce demand effects&lt;/li&gt;
&lt;li&gt;Include checks for hypothesis guessing when manipulation is obvious&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Application Criteria&lt;/strong&gt;: Most effective when sample availability is limited and individual differences are substantial.&lt;/p&gt;
&lt;h3 id=&#34;42-covariate-implementation&#34;&gt;4.2 Covariate Implementation:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Identify variables with strong expected correlation to your DV (r &amp;gt; .2)&lt;/li&gt;
&lt;li&gt;Measure covariates before introducing your manipulation&lt;/li&gt;
&lt;li&gt;Use different measurement scales for covariates and DVs&lt;/li&gt;
&lt;li&gt;Test for treatment-by-covariate interactions&lt;/li&gt;
&lt;li&gt;Only include covariates that meet all statistical assumptions&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Critical Requirements&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Manipulation must not affect the covariate&lt;/li&gt;
&lt;li&gt;Covariate must not interact with the treatment&lt;/li&gt;
&lt;li&gt;Measurement of covariate should not influence DV response&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;43-manipulation-optimization&#34;&gt;4.3 Manipulation Optimization:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Design direct rather than indirect manipulations&lt;/li&gt;
&lt;li&gt;Create clean manipulations that avoid confounds&lt;/li&gt;
&lt;li&gt;Use pre-tests to calibrate manipulation strength&lt;/li&gt;
&lt;li&gt;Include manipulation checks in study design&lt;/li&gt;
&lt;li&gt;Select manipulation levels where marginal effects are strongest&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Implementation Note&lt;/strong&gt;: Balance manipulation strength against potential demand effects.&lt;/p&gt;
&lt;h2 id=&#34;5-participant-management&#34;&gt;5. Participant Management&lt;/h2&gt;
&lt;h3 id=&#34;51-quality-control-procedures&#34;&gt;5.1 Quality Control Procedures:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Implement Instructional Manipulation Checks (IMCs)&lt;/li&gt;
&lt;li&gt;Monitor response times for unusually fast completion&lt;/li&gt;
&lt;li&gt;Apply consistent exclusion criteria across all studies&lt;/li&gt;
&lt;li&gt;Document all exclusions transparently&lt;/li&gt;
&lt;li&gt;Complete all exclusions before hypothesis testing&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Application Protocol&lt;/strong&gt;: Define exclusion criteria explicitly in pre-registration and never deviate based on results.&lt;/p&gt;
&lt;h3 id=&#34;52-participant-selection-optimization&#34;&gt;5.2 Participant Selection Optimization:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Define relevant participant characteristics&lt;/li&gt;
&lt;li&gt;Screen participants before the main study&lt;/li&gt;
&lt;li&gt;Create more homogeneous participant groups&lt;/li&gt;
&lt;li&gt;Consider targeted recruitment for higher relevance&lt;/li&gt;
&lt;li&gt;Balance specificity against generalizability concerns&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Implementation Strategy&lt;/strong&gt;: Target participants for whom stimuli are relevant but avoid introducing selection biases.&lt;/p&gt;
&lt;h2 id=&#34;6-analytical-techniques&#34;&gt;6. Analytical Techniques&lt;/h2&gt;
&lt;h3 id=&#34;61-planned-contrast-implementation&#34;&gt;6.1 Planned Contrast Implementation:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Specify expected pattern of means before data collection&lt;/li&gt;
&lt;li&gt;Develop contrast codes that directly test hypotheses&lt;/li&gt;
&lt;li&gt;Use focused tests instead of omnibus tests&lt;/li&gt;
&lt;li&gt;Test residual variance to confirm pattern specificity&lt;/li&gt;
&lt;li&gt;Apply consistent analysis approaches across studies&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Application Benefit&lt;/strong&gt;: Increases power by testing only the specific pattern of interest.&lt;/p&gt;
&lt;h3 id=&#34;62-interaction-analysis-protocol&#34;&gt;6.2 Interaction Analysis Protocol:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Select moderators based on theoretical mechanisms&lt;/li&gt;
&lt;li&gt;Avoid &amp;ldquo;meaningless moderation&amp;rdquo; that creates ceiling effects&lt;/li&gt;
&lt;li&gt;Increase sample size appropriately for interaction tests (4x main effect sample)&lt;/li&gt;
&lt;li&gt;Report simple effects to clarify interaction patterns&lt;/li&gt;
&lt;li&gt;Interpret moderation in relation to underlying theory&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Implementation Warning&lt;/strong&gt;: Never test moderators post-hoc without theoretical justification.&lt;/p&gt;
&lt;h2 id=&#34;7-avoiding-methodological-pitfalls&#34;&gt;7. Avoiding Methodological Pitfalls&lt;/h2&gt;
&lt;h3 id=&#34;common-malpractice-warning-signs&#34;&gt;Common Malpractice Warning Signs:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Analyzing data before collection is complete&lt;/li&gt;
&lt;li&gt;Testing multiple exclusion criteria selectively&lt;/li&gt;
&lt;li&gt;Adding covariates post-hoc based on results&lt;/li&gt;
&lt;li&gt;Optional stopping when results become significant&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;prevention-protocol&#34;&gt;Prevention Protocol:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Establish all analytical decisions before data collection&lt;/li&gt;
&lt;li&gt;Apply criteria consistently across all studies&lt;/li&gt;
&lt;li&gt;Report all analyses conducted, significant or not&lt;/li&gt;
&lt;li&gt;Maintain a detailed research log for all decisions&lt;/li&gt;
&lt;li&gt;Conduct confirmatory replications for important findings&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;8-power-enhancement-techniques-summary&#34;&gt;8. Power Enhancement Techniques Summary&lt;/h2&gt;
&lt;h3 id=&#34;measurement-optimization&#34;&gt;Measurement Optimization:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Implement multi-item scales rather than single items&lt;/li&gt;
&lt;li&gt;Verify reliability (α &amp;gt; .8) before deployment&lt;/li&gt;
&lt;li&gt;Select measures with appropriate sensitivity&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;error-variance-reduction&#34;&gt;Error Variance Reduction:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Standardize experimental environment&lt;/li&gt;
&lt;li&gt;Create consistent procedural instructions&lt;/li&gt;
&lt;li&gt;Implement computerized timing when possible&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;stimuli-optimization&#34;&gt;Stimuli Optimization:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Select stimuli with sufficient room for movement (avoid floor/ceiling)&lt;/li&gt;
&lt;li&gt;Match stimuli appropriately to participant demographics&lt;/li&gt;
&lt;li&gt;Conduct pilot tests to assess malleability&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;data-quality-control&#34;&gt;Data Quality Control:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Remove problematic data points using predetermined criteria&lt;/li&gt;
&lt;li&gt;Apply appropriate transformations for skewed distributions&lt;/li&gt;
&lt;li&gt;Document all data processing steps transparently&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;9-replication-protocol&#34;&gt;9. Replication Protocol&lt;/h2&gt;
&lt;h3 id=&#34;implementation-steps&#34;&gt;Implementation Steps:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Reproduce original study with minimal modifications&lt;/li&gt;
&lt;li&gt;Apply identical exclusion criteria and analyses&lt;/li&gt;
&lt;li&gt;Compare effect sizes between original and replication&lt;/li&gt;
&lt;li&gt;If confirmed, extend with additional conditions&lt;/li&gt;
&lt;li&gt;If unsuccessful, systematically examine methodological differences&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Strategic Application&lt;/strong&gt;: Use replications to validate effects and build cumulative knowledge.&lt;/p&gt;
&lt;h2 id=&#34;10-effect-size-reference-guide&#34;&gt;10. Effect Size Reference Guide&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Effect Size Type&lt;/th&gt;
&lt;th&gt;Small&lt;/th&gt;
&lt;th&gt;Medium&lt;/th&gt;
&lt;th&gt;Large&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cohen&amp;rsquo;s d&lt;/td&gt;
&lt;td&gt;0.2&lt;/td&gt;
&lt;td&gt;0.5&lt;/td&gt;
&lt;td&gt;0.8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;η²&lt;/td&gt;
&lt;td&gt;.01&lt;/td&gt;
&lt;td&gt;.06&lt;/td&gt;
&lt;td&gt;.15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;R²&lt;/td&gt;
&lt;td&gt;.01&lt;/td&gt;
&lt;td&gt;.09&lt;/td&gt;
&lt;td&gt;.25&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Sample Size Required for 80% Power (Two-tailed, $ \alpha = .05$)&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Effect Size (d)&lt;/th&gt;
&lt;th&gt;Between-Subjects&lt;/th&gt;
&lt;th&gt;Within-Subjects (r=.5)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0.2 (Small)&lt;/td&gt;
&lt;td&gt;394 per group&lt;/td&gt;
&lt;td&gt;199 total&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0.5 (Medium)&lt;/td&gt;
&lt;td&gt;64 per group&lt;/td&gt;
&lt;td&gt;33 total&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0.8 (Large)&lt;/td&gt;
&lt;td&gt;26 per group&lt;/td&gt;
&lt;td&gt;14 total&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Effective marketing experiments require both scientific rigor and practical feasibility. By implementing these techniques systematically, researchers can increase statistical power without relying solely on massive samples. Remember that the goal is not simply statistical significance but accurately measuring marketing phenomena with precision and integrity.&lt;/p&gt;
&lt;h2 id=&#34;reference&#34;&gt;Reference&lt;/h2&gt;
&lt;p&gt;Meyvis, T., &amp;amp; Van Osselaer, S. M. J. (2018). Increasing the Power of Your Study by Increasing the Effect Size. &lt;em&gt;Journal of Consumer Research&lt;/em&gt;, &lt;em&gt;44&lt;/em&gt;(5), 1157–1173. &lt;a href=&#34;https://doi.org/10.1093/jcr/ucx110&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;https://doi.org/10.1093/jcr/ucx110&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Text Mining with R Notes</title>
      <link>https://chenxing.space/blog/text-mining-with-r-stduy-notes/</link>
      <pubDate>Thu, 25 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://chenxing.space/blog/text-mining-with-r-stduy-notes/</guid>
      <description>&lt;h2 id=&#34;textbook&#34;&gt;Textbook&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.tidytextmining.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Text Mining with R&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;tutorial&#34;&gt;Tutorial&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://juliasilge.github.io/tidytext/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;juliasilge.github.io/tidytext/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sentiment Analysis: &lt;a href=&#34;https://cran.r-project.org/web/packages/syuzhet/vignettes/syuzhet-vignette.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Introduction to the Syuzhet Package&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;definitions&#34;&gt;Definitions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;token&lt;/strong&gt; is a meaningful unit of text, most often a word, that we are interested in using for further analysis, and &lt;strong&gt;tokenization&lt;/strong&gt; is the process of splitting text into tokens.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;key-functions&#34;&gt;Key functions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;unnest_tokens()&lt;/code&gt;: do tokenization and get  one-word-per-row format.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;anti_join(get_stopwords())&lt;/code&gt;: We can remove stop words (accessible in a tidy form with the function &lt;code&gt;get_stopwords()&lt;/code&gt;) with an &lt;code&gt;anti_join&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;r-code&#34;&gt;R code&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-r&#34; data-lang=&#34;r&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Loading necessary libraries&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nf&#34;&gt;library&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sentimentr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nf&#34;&gt;library&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;dplyr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;## 
## Attaching package: &amp;#39;dplyr&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;## The following objects are masked from &amp;#39;package:stats&amp;#39;:
## 
##     filter, lag
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;## The following objects are masked from &amp;#39;package:base&amp;#39;:
## 
##     intersect, setdiff, setequal, union
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-r&#34; data-lang=&#34;r&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nf&#34;&gt;library&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;magrittr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Example text&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;mytext&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;-&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;c&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;The phone has scratches.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;The phone has no scratches.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Converting text into sentences&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;mytext&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;-&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_sentences&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mytext&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Performing sentiment analysis&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nf&#34;&gt;sentiment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mytext&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;##    element_id sentence_id word_count  sentiment
## 1:          1           1          4 -0.3000000
## 2:          2           1          5  0.2683282
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-r&#34; data-lang=&#34;r&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nf&#34;&gt;library&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;syuzhet&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;## 
## Attaching package: &amp;#39;syuzhet&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;## The following object is masked from &amp;#39;package:sentimentr&amp;#39;:
## 
##     get_sentences
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-r&#34; data-lang=&#34;r&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Example sentences&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sentences&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;-&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;c&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;The phone has scratches.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;The phone has no scratches.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Get sentiment scores&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sentiment_scores&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;-&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_nrc_sentiment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sentences&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# View scores&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sentiment_scores&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;##   anger anticipation disgust fear joy sadness surprise trust negative positive
## 1     0            0       0    0   0       0        0     0        0        0
## 2     0            0       0    0   0       0        0     0        0        0
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-r&#34; data-lang=&#34;r&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# not work well&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Learning Resource: Social Network Analysis</title>
      <link>https://chenxing.space/blog/learning-resource-social-network-analysis/</link>
      <pubDate>Fri, 24 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://chenxing.space/blog/learning-resource-social-network-analysis/</guid>
      <description>&lt;div class=&#34;alert alert-tip&#34;&gt;
  &lt;div&gt;
    Check out &lt;code&gt;igraph&lt;/code&gt; R-package 📦!
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;summary-of-concepts&#34;&gt;Summary of Concepts&lt;/h2&gt;
&lt;p&gt;See my notes in “Analyzing Social Media Networks with NodeXL: Insights from A Connected World” (Hansen et al. 2019), Chapter 3 Sections 3.1-3.5 (pages 31-42).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Node&lt;/strong&gt;: Represents an entity (e.g., individual, organization) within the network.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Edge&lt;/strong&gt;: Connects two nodes, symbolizing a relationship or interaction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Graph&lt;/strong&gt;: The entire structure comprising nodes and edges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Degree&lt;/strong&gt;: Number of connections for a node, with in-degree and out-degree in directed networks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Path&lt;/strong&gt;: Sequence of edges linking two nodes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Centrality&lt;/strong&gt;: Quantifies the importance of nodes.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Degree Centrality: Frequency of a node in the network.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Betweenness Centrality: Frequency of a node appearing on shortest paths between other nodes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Closeness Centrality: Proximity of a node to all other nodes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Eigenvector Centrality: Influence level of a node.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Diameter&lt;/strong&gt;: Longest shortest path within the network.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Community&lt;/strong&gt;: Nodes more densely connected to each other than to the rest of the network.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Homophily&lt;/strong&gt;: Tendency to connect with similar others.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Structural Holes&lt;/strong&gt;: Gaps offering strategic advantages in information flow.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Social Capital&lt;/strong&gt;: Benefits and resources accessible through social networks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Small-world Network&lt;/strong&gt;: Characterized by short path lengths and high clustering.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Scale-free Network&lt;/strong&gt;: Features a power-law degree distribution with few highly connected nodes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Network Density&lt;/strong&gt;: Proportion of actual connections to potential connections.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Modularity&lt;/strong&gt;: Strength of a network’s division into modules or communities.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;summary-table&#34;&gt;Summary Table&lt;/h3&gt;
&lt;p&gt;The following summary table is from (Kane et al. 2014).&lt;/p&gt;
&lt;img src=&#34;https://raw.githubusercontent.com/chenx2018/blogdown-image/main/uPic/image-20231126085650887.png&#34; alt=&#34;image-20231126085650887&#34; style=&#34;zoom:50%;&#34; /&gt;
&lt;h3 id=&#34;understanding-the-role-of-random-graphs-in-network-analysis&#34;&gt;Understanding the Role of Random Graphs in Network Analysis&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Contextual Analysis of Network Metrics:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Random graphs help in evaluating the significance of network metrics by providing a comparison point.&lt;/li&gt;
&lt;li&gt;This approach determines if observed network patterns are typical or atypical under certain conditions.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Assessing Significance and Likelihood:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;By comparing real network characteristics to those of random graphs, it’s possible to assess the likelihood of these characteristics occurring by chance.&lt;/li&gt;
&lt;li&gt;Significant differences in metrics like clustering suggest underlying social processes, not just random formation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Baseline for Comparison (Null Model):&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;A random graph acts as a baseline, representing a network where connections are formed randomly.&lt;/li&gt;
&lt;li&gt;Comparing real networks to this baseline identifies non-random, significant features of the network.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;alert alert-tip&#34;&gt;
  &lt;div&gt;
    &lt;p&gt;Randomization tests enable you to identify:&lt;/p&gt;
&lt;p&gt;Whether features of your original network are particularly unusual.&lt;/p&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Simplicity in Modeling:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;The simplest random graph mirrors the original graph in terms of number of nodes and density, facilitating easier statistical analysis.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Methodological Rigor:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Utilizing random graphs adds rigor and depth to network analysis.&lt;/li&gt;
&lt;li&gt;It aids in discerning meaningful social network patterns from those that might arise randomly.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This summary encapsulates the importance of using random graphs in social network analysis, particularly for understanding the significance and context of various network properties and metrics.&lt;/p&gt;
&lt;h2 id=&#34;datacamp-course-notes-key-functions-in-igraph&#34;&gt;Datacamp course notes: key functions in &lt;code&gt;igraph&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Chapter 1: Basic Network Analysis&lt;/p&gt;
&lt;p&gt;Creating and Visualizing Graphs&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Create Graph&lt;/strong&gt;: &lt;code&gt;graph.edgelist(as.matrix(df), directed = FALSE)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vertices and Edges&lt;/strong&gt;: &lt;code&gt;V(g)&lt;/code&gt;, &lt;code&gt;E(g)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Graph Order and Size&lt;/strong&gt;: &lt;code&gt;gorder(g)&lt;/code&gt;, &lt;code&gt;gsize(g)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plot Graph&lt;/strong&gt;: &lt;code&gt;plot(g)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Attributes&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Add Vertex Attributes&lt;/strong&gt;: &lt;code&gt;set_vertex_attr(g, &amp;quot;attribute&amp;quot;, value)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Get Vertex Attributes&lt;/strong&gt;: &lt;code&gt;vertex_attr(g)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add Edge Attributes&lt;/strong&gt;: &lt;code&gt;set_edge_attr(g, &amp;quot;attribute&amp;quot;, value)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Get Edge Attributes&lt;/strong&gt;: &lt;code&gt;edge_attr(g)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Subsetting and Coloring&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Subsetting Networks&lt;/strong&gt;: &lt;code&gt;E(g)[[.inc(&#39;vertex&#39;)]]&lt;/code&gt;, &lt;code&gt;E(g)[[condition]]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Coloring Vertices&lt;/strong&gt;: &lt;code&gt;V(g)$color &amp;lt;- ifelse(condition, &amp;quot;color1&amp;quot;, &amp;quot;color2&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Layouts&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Graph Layouts&lt;/strong&gt;: &lt;code&gt;plot(g, layout = layout.fruchterman.reingold(g))&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Chapter 2: Advanced Network Analysis Techniques&lt;/p&gt;
&lt;p&gt;Directionality and Degrees&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Check Directionality&lt;/strong&gt;: &lt;code&gt;is.directed(g)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Degree Analysis&lt;/strong&gt;: &lt;code&gt;degree(g, mode = c(&amp;quot;out&amp;quot;))&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Neighbors&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Identify Neighbors&lt;/strong&gt;: &lt;code&gt;neighbors(g, &amp;quot;vertex&amp;quot;, mode = c(&amp;quot;mode&amp;quot;))&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Common Neighbors&lt;/strong&gt;: &lt;code&gt;intersection(x, y)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Paths&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Longest Paths&lt;/strong&gt;: &lt;code&gt;farthest_vertices(g)&lt;/code&gt;, &lt;code&gt;get_diameter(g)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ego Networks&lt;/strong&gt;: &lt;code&gt;ego(g, N, &#39;vertex&#39;, mode=c(&#39;mode&#39;))&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Importance Measures&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Betweenness&lt;/strong&gt;: &lt;code&gt;betweenness(g, directed = TRUE, normalized = TRUE)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Other Measures&lt;/strong&gt;: &lt;code&gt;degree&lt;/code&gt;, &lt;code&gt;eigenvector centrality&lt;/code&gt;, &lt;code&gt;closeness centrality&lt;/code&gt;, &lt;code&gt;pagerank centrality&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Chapter 3: Network Metrics and Random Graphs&lt;/p&gt;
&lt;p&gt;Centrality and Density&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Eigenvector Centrality&lt;/strong&gt;: &lt;code&gt;eigen_centrality(g)$vector&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Density&lt;/strong&gt;: &lt;code&gt;edge_density(g)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Path Length and Random Graphs&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Average Path Length&lt;/strong&gt;: &lt;code&gt;mean_distance(g, directed = FALSE)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Random Graphs&lt;/strong&gt;: &lt;code&gt;erdos.renyi.game(n, p.or.m, type)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Transitivity&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Transitivity&lt;/strong&gt;: &lt;code&gt;triangles(g)&lt;/code&gt;, &lt;code&gt;transitivity(g)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local Transitivity&lt;/strong&gt;: &lt;code&gt;transitivity(g, vids = &#39;vertex&#39;, type = &amp;quot;local&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cliques&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Identifying Cliques&lt;/strong&gt;: &lt;code&gt;largest_cliques(g)&lt;/code&gt;, &lt;code&gt;max_cliques(g)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Chapter 4: Community Detection and Visualization&lt;/p&gt;
&lt;p&gt;Assortativity and Reciprocity&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Assortativity&lt;/strong&gt;: &lt;code&gt;assortativity(g, values)&lt;/code&gt;, &lt;code&gt;assortativity.degree(g, directed = FALSE)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reciprocity&lt;/strong&gt;: &lt;code&gt;reciprocity(g)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Community Detection&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fast-Greedy Detection&lt;/strong&gt;: &lt;code&gt;fastgreedy.community(g)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Edge-Betweenness Detection&lt;/strong&gt;: &lt;code&gt;edge.betweenness.community(g)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Community Analysis&lt;/strong&gt;: &lt;code&gt;length(x)&lt;/code&gt;, &lt;code&gt;sizes(x)&lt;/code&gt;, &lt;code&gt;membership(x)&lt;/code&gt;, &lt;code&gt;plot(x, g)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Visualization&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Visualization Packages&lt;/strong&gt;: &lt;code&gt;igraph&lt;/code&gt;, &lt;code&gt;visNetwork&lt;/code&gt;, &lt;code&gt;statnet&lt;/code&gt;, &lt;code&gt;networkD3&lt;/code&gt;, &lt;code&gt;ggnet&lt;/code&gt;, &lt;code&gt;sigma&lt;/code&gt;, &lt;code&gt;ggnetwork&lt;/code&gt;, &lt;code&gt;rgexf&lt;/code&gt;, &lt;code&gt;ggraph&lt;/code&gt;, &lt;code&gt;threejs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Threejs Visualization&lt;/strong&gt;: &lt;code&gt;library(threejs)&lt;/code&gt;, &lt;code&gt;graphjs(g)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Adding Attributes&lt;/strong&gt;: &lt;code&gt;set_vertex_attr(g, &amp;quot;label&amp;quot;, value = V(g)$name)&lt;/code&gt;, &lt;code&gt;set_vertex_attr(g, &amp;quot;color&amp;quot;, value = &amp;quot;color&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Coloring Communities&lt;/strong&gt;: &lt;code&gt;x = edge.betweenness.community(g)&lt;/code&gt;, &lt;code&gt;i &amp;lt;- membership(x)&lt;/code&gt;, &lt;code&gt;set_vertex_attr(g, &amp;quot;color&amp;quot;, value = c(&amp;quot;color1&amp;quot;, &amp;quot;color2&amp;quot;, &amp;quot;color3&amp;quot;)[i])&lt;/code&gt;, &lt;code&gt;graphjs(g)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;useful-resource&#34;&gt;Useful resource&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;datacamp “Network Analysis in R”.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;YouTube tutorial &lt;a href=&#34;https://www.youtube.com/playlist?list=PL1M5TsfDV6VsyfMHfkDcUW71ADKcUNCUI&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Social Network Analysis: A Beginner’s Lab in R&lt;/a&gt; provided by Duke University Network Analysis Center.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Textbook: “Statistical Analysis of Network Data with R” by Eric D. Kolaczyk (Kolaczyk and Csárdi 2014).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;alert alert-tip&#34;&gt;
  &lt;div&gt;
    Use index to check definitions and concepts of network and R coding.
  &lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Please check out &lt;a href=&#34;https://r.igraph.org/index.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;R package: igraph&lt;/a&gt;. If you need to know how to compute a particular attribute of the network, the &lt;a href=&#34;https://r.igraph.org/reference/index.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;reference page&lt;/a&gt; is a good starting point.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There are many packages available to make network plots. One very useful one is &lt;code&gt;threejs&lt;/code&gt; which allows you to make interactive network visualizations. This package also integrates seamlessly with &lt;code&gt;igraph&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;reference&#34;&gt;Reference&lt;/h2&gt;
&lt;div id=&#34;refs&#34; class=&#34;references csl-bib-body hanging-indent&#34; entry-spacing=&#34;0&#34;&gt;
&lt;div id=&#34;ref-9780128177570&#34; class=&#34;csl-entry&#34;&gt;
&lt;p&gt;Hansen, Derek, Ben Shneiderman, Marc A. Smith, and Itai Himelboim. 2019. &lt;em&gt;Analyzing Social Media Networks with NodeXL&lt;/em&gt;. Morgan Kaufmann.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;ref-KaneUnknownTitle2014&#34; class=&#34;csl-entry&#34;&gt;
&lt;p&gt;Kane, Gerald C., and Maryam Alavi, Giuseppe (Joe) Labianca, Stephen P. Borgatti, and and and. 2014. “What’s Different about Social Media Networks? A Framework and Research Agenda.” &lt;em&gt;MIS Quarterly&lt;/em&gt;. &lt;a href=&#34;https://doi.org/10.25300/misq/2014/38.1.13&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;https://doi.org/10.25300/misq/2014/38.1.13&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;ref-1493909827&#34; class=&#34;csl-entry&#34;&gt;
&lt;p&gt;Kolaczyk, Eric D., and Gábor Csárdi. 2014. &lt;em&gt;Statistical Analysis of Network Data with r&lt;/em&gt;. Springer.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
  </channel>
</rss>
