<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									STATA Programming - AxeUSCE Forum				            </title>
            <link>https://axeusce.com/community-4/disscussion-2/</link>
            <description>AxeUSCE Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Sun, 26 Apr 2026 20:33:49 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Understanding Confounding Variables in Medical Research</title>
                        <link>https://axeusce.com/community-4/disscussion-2/understanding-confounding-variables-in-medical-research/</link>
                        <pubDate>Wed, 20 Aug 2025 15:16:08 +0000</pubDate>
                        <description><![CDATA[Overview:Confounding variables are factors other than the independent variable that may affect the outcome of a study. Recognizing and controlling for confounders is crucial to ensure the va...]]></description>
                        <content:encoded><![CDATA[<p data-start="164" data-end="503"><strong data-start="164" data-end="177">Overview:</strong><br data-start="177" data-end="180" />Confounding variables are factors other than the independent variable that may affect the outcome of a study. Recognizing and controlling for confounders is crucial to ensure the validity and accuracy of research findings. Misinterpreting confounding can lead to incorrect conclusions and affect clinical decision-making.</p>
<p data-start="505" data-end="526"><strong data-start="505" data-end="524">Why It Matters:</strong></p>
<ul data-start="527" data-end="771">
<li data-start="527" data-end="617">
<p data-start="529" data-end="617">Confounders can create false associations or hide true associations between variables.</p>
</li>
<li data-start="618" data-end="693">
<p data-start="620" data-end="693">Properly addressing confounding improves the credibility of your study.</p>
</li>
<li data-start="694" data-end="771">
<p data-start="696" data-end="771">Helps researchers design better studies and interpret results accurately.</p>
</li>
</ul>
<p data-start="773" data-end="818"><strong data-start="773" data-end="816">How to Identify and Handle Confounding:</strong></p>
<ul data-start="819" data-end="1052">
<li data-start="819" data-end="893">
<p data-start="821" data-end="893">Use stratification or matching to control confounders in study design.</p>
</li>
<li data-start="894" data-end="974">
<p data-start="896" data-end="974">Apply multivariable regression models to adjust for confounders in analysis.</p>
</li>
<li data-start="975" data-end="1052">
<p data-start="977" data-end="1052">Always discuss potential confounders in the limitations of your research.</p>
</li>
</ul>
<p data-start="1054" data-end="1069"><strong data-start="1054" data-end="1067">Examples:</strong></p>
<ol data-start="1070" data-end="1350">
<li data-start="1070" data-end="1176">
<p data-start="1073" data-end="1176">Studying the link between coffee consumption and heart disease without accounting for smoking habits.</p>
</li>
<li data-start="1177" data-end="1263">
<p data-start="1180" data-end="1263">Examining exercise and blood pressure levels without considering age as a factor.</p>
</li>
<li data-start="1264" data-end="1350">
<p data-start="1267" data-end="1350">Investigating medication effects on diabetes outcomes without adjusting for diet.</p>
</li>
</ol>]]></content:encoded>
						                            <category domain="https://axeusce.com/community-4/disscussion-2/">STATA Programming</category>                        <dc:creator>Dr. Rahima Noor</dc:creator>
                        <guid isPermaLink="true">https://axeusce.com/community-4/disscussion-2/understanding-confounding-variables-in-medical-research/</guid>
                    </item>
				                    <item>
                        <title>Statistical Bias</title>
                        <link>https://axeusce.com/community-4/disscussion-2/statistical-bias/</link>
                        <pubDate>Mon, 21 Jul 2025 21:27:41 +0000</pubDate>
                        <description><![CDATA[What Exactly is Statistical Bias?
Statistical bias isn’t just a technical error—it’s the silent thief that sneaks into your research and distorts your findings. It occurs when the data coll...]]></description>
                        <content:encoded><![CDATA[<h3 data-start="168" data-end="212">What <em data-start="180" data-end="189">Exactly</em> is Statistical Bias?</h3>
<p data-start="213" data-end="540">Statistical bias isn’t just a technical error—it’s the silent thief that sneaks into your research and distorts your findings. It occurs when the data collected, analyzed, or interpreted leads to conclusions that consistently lean in one direction, away from the truth. It's not about random mistakes—it’s a systematic problem.</p>
<h3 data-start="542" data-end="579">&#x26a0;&#xfe0f; Why Should Researchers Care?</h3>
<p data-start="580" data-end="842">Bias can make even the most sophisticated analysis completely unreliable. Imagine putting hours into a study, only to realize your sample was flawed or your method favored one outcome. That’s how bias quietly undermines credibility, trust, and real-world impact.</p>
<h3 data-start="844" data-end="879">&#x1f9e0; Types You Might Not Notice</h3>
<p data-start="880" data-end="1189">Selection bias creeps in when your sample doesn’t represent the population. Measurement bias happens when your tools or methods aren’t accurate. And then there’s publication bias—where only “positive” results get published, skewing the entire scientific conversation. These aren’t rare—they’re <em data-start="1174" data-end="1182">common</em> traps.</p>
<h3 data-start="1191" data-end="1224">&#x1f6e1;&#xfe0f; Can You Eliminate Bias?</h3>
<p data-start="1225" data-end="1462">Not completely. But you can detect it, reduce it, and account for it. Techniques like randomization, blinding, and sensitivity analysis aren’t just good practice—they’re your best defense. Awareness is the first step, action is the next.</p>
<h3 data-start="1464" data-end="1483">&#x1f4ac; Let’s Talk</h3>
<p data-start="1484" data-end="1688">Have you ever encountered bias in your research? How did you deal with it—or did you notice it only after the results came in? Share your experience, tips, or questions below. Let’s learn from each other.</p>]]></content:encoded>
						                            <category domain="https://axeusce.com/community-4/disscussion-2/">STATA Programming</category>                        <dc:creator>Dr. Rahima Noor</dc:creator>
                        <guid isPermaLink="true">https://axeusce.com/community-4/disscussion-2/statistical-bias/</guid>
                    </item>
				                    <item>
                        <title>Beginner’s Guide to Using Stata for Medical Research</title>
                        <link>https://axeusce.com/community-4/disscussion-2/beginners-guide-to-using-stata-for-medical-research/</link>
                        <pubDate>Sun, 22 Jun 2025 16:45:07 +0000</pubDate>
                        <description><![CDATA[1. Introduction to StataStata is a powerful statistical software widely used in medical research for data management, analysis, and visualization. Its user-friendly interface and versatile c...]]></description>
                        <content:encoded><![CDATA[<p data-start="152" data-end="436"><strong data-start="152" data-end="180">1. Introduction to Stata</strong><br data-start="180" data-end="183" />Stata is a powerful statistical software widely used in medical research for data management, analysis, and visualization. Its user-friendly interface and versatile commands make it suitable for both beginners and advanced users in the healthcare field.</p>
<p data-start="438" data-end="722"><strong data-start="438" data-end="476">2. Installing and Setting Up Stata</strong><br data-start="476" data-end="479" />Start by purchasing or accessing an institutional license for Stata. After installation, familiarize yourself with the interface: the Command window, Results window, Variables window, and Data Editor. This setup helps streamline your workflow.</p>
<p data-start="724" data-end="995"><strong data-start="724" data-end="745">3. Importing Data</strong><br data-start="745" data-end="748" />Stata supports importing data from various formats such as Excel, CSV, and text files. Use commands like <code data-start="853" data-end="867">import excel</code> or <code data-start="871" data-end="880">insheet</code> to bring your data into Stata. Always check for missing values or errors after importing to ensure data integrity.</p>
<p data-start="997" data-end="1261"><strong data-start="997" data-end="1025">4. Basic Data Management</strong><br data-start="1025" data-end="1028" />Learn essential commands like <code data-start="1058" data-end="1064">list</code>, <code data-start="1066" data-end="1074">browse</code>, <code data-start="1076" data-end="1087">summarize</code>, <code data-start="1089" data-end="1099">describe</code>, and <code data-start="1105" data-end="1115">generate</code> for exploring and managing your dataset. Understanding how to clean and manipulate data is crucial for producing accurate and meaningful results.</p>
<p data-start="1263" data-end="1518"><strong data-start="1263" data-end="1292">5. Descriptive Statistics</strong><br data-start="1292" data-end="1295" />Start with descriptive statistics to summarize your data. Commands like <code data-start="1367" data-end="1377">tabulate</code>, <code data-start="1379" data-end="1390">summarize</code>, and <code data-start="1396" data-end="1402">mean</code> provide an overview of your variables and distributions. These steps lay the foundation for more advanced analyses.</p>
<p data-start="1520" data-end="1798"><strong data-start="1520" data-end="1555">6. Performing Statistical Tests</strong><br data-start="1555" data-end="1558" />Stata offers a wide range of statistical tests: t-tests, chi-square tests, ANOVA, regression models, and more. For example, use <code data-start="1686" data-end="1693">ttest</code> for comparing means and <code data-start="1718" data-end="1727">regress</code> for linear regression. Always verify assumptions before running tests.</p>
<p data-start="1800" data-end="2060"><strong data-start="1800" data-end="1833">7. Graphing and Visualization</strong><br data-start="1833" data-end="1836" />Visualizing data helps in understanding patterns and communicating findings. Use commands like <code data-start="1931" data-end="1942">graph bar</code>, <code data-start="1944" data-end="1953">scatter</code>, and <code data-start="1959" data-end="1967">twoway</code> to create informative charts. Stata also allows customization to suit publication standards.</p>
<p data-start="2062" data-end="2296"><strong data-start="2062" data-end="2097">8. Saving and Exporting Results</strong><br data-start="2097" data-end="2100" />Save your work frequently with <code data-start="2131" data-end="2137">save</code> and export results using <code data-start="2163" data-end="2172">outreg2</code> or <code data-start="2176" data-end="2190">export excel</code>. Proper documentation of your outputs ensures reproducibility and ease of reporting for medical journals.</p>
<p data-start="2298" data-end="2538"><strong data-start="2298" data-end="2323">9. Learning Resources</strong><br data-start="2323" data-end="2326" />Enhance your Stata skills with online tutorials, official Stata documentation, and community forums like Statalist. Many universities also offer workshops or courses specifically tailored for medical researchers.</p>
<p data-start="2540" data-end="2772"><strong data-start="2540" data-end="2558">10. Conclusion</strong><br data-start="2558" data-end="2561" />Mastering Stata takes practice, but it is a valuable tool for medical research. Start with small projects, gradually explore advanced features, and leverage the supportive Stata community to grow your expertise.</p>]]></content:encoded>
						                            <category domain="https://axeusce.com/community-4/disscussion-2/">STATA Programming</category>                        <dc:creator>Dr. Rahima Noor</dc:creator>
                        <guid isPermaLink="true">https://axeusce.com/community-4/disscussion-2/beginners-guide-to-using-stata-for-medical-research/</guid>
                    </item>
				                    <item>
                        <title>what is entropy balancing ebalfit module on STATA?</title>
                        <link>https://axeusce.com/community-4/disscussion-2/what-is-entropy-balancing-ebalfit-module-on-stata/</link>
                        <pubDate>Tue, 18 Mar 2025 02:51:09 +0000</pubDate>
                        <description><![CDATA[install ebalfitssc install ebalfit
 
Additionally, the latest version of moremata is required. You can update it by running:
ssc install moremata, replace
The moremata package provides M...]]></description>
                        <content:encoded><![CDATA[<p>install ebalfit<br /><br />ssc install ebalfit</p>
<p> </p>
<p>Additionally, the latest version of <strong data-start="218" data-end="230">moremata</strong> is required. You can update it by running:</p>
<p>ssc install moremata, replace<br /><br /></p>
<p data-start="380" data-end="514">The <strong data-start="384" data-end="396">moremata</strong> package provides Mata functions essential for <strong data-start="443" data-end="454">ebalfit</strong> to operate correctly.</p>
<p data-start="516" data-end="544"><strong data-start="516" data-end="544">Key Features of ebalfit:</strong></p>
<ul data-start="546" data-end="873">
<li data-start="546" data-end="651">
<p data-start="548" data-end="651"><strong data-start="548" data-end="569">Model Estimation:</strong> <span class="relative -mx-px my- rounded px-px py-">Estimates an entropy balancing model, similar to a logit model, and displays coefficients with standard errors.</span>​</p>
</li>
<li data-start="653" data-end="759">
<p data-start="655" data-end="759"><strong data-start="655" data-end="677">Weight Generation:</strong> <span class="relative -mx-px my- rounded px-px py-">After estimation, use the <code data-start="26" data-end="35">predict</code> command to generate balancing weights or the implied propensity scores.</span>​</p>
</li>
<li data-start="761" data-end="873">
<p data-start="763" data-end="873"><strong data-start="763" data-end="787">Variance Estimation:</strong> <span class="relative -mx-px my- rounded px-px py-">Utilizes influence functions for variance estimation, which can be stored for adjusting standard errors of statistics computed using the balancing weights.</span></p>
</li>
</ul>
<p> </p>]]></content:encoded>
						                            <category domain="https://axeusce.com/community-4/disscussion-2/">STATA Programming</category>                        <dc:creator>mdyasarsattar</dc:creator>
                        <guid isPermaLink="true">https://axeusce.com/community-4/disscussion-2/what-is-entropy-balancing-ebalfit-module-on-stata/</guid>
                    </item>
				                    <item>
                        <title>what is ihstrans (inverse hyperbolic sine (IHS) transformation) in stata and why we use ihs?</title>
                        <link>https://axeusce.com/community-4/disscussion-2/what-is-ihstrans-inverse-hyperbolic-sine-ihs-transformation-in-stata-and-why-we-use-ihs/</link>
                        <pubDate>Tue, 18 Mar 2025 01:28:08 +0000</pubDate>
                        <description><![CDATA[In Stata, ihstrans() is a function that applies the inverse hyperbolic sine (IHS) transformation to a variable. The IHS transformation is used to deal with data that has skewness or includes...]]></description>
                        <content:encoded><![CDATA[<p data-start="0" data-end="289">In <strong data-start="3" data-end="12">Stata</strong>, <code data-start="14" data-end="26">ihstrans()</code> is a function that applies the <strong data-start="58" data-end="106">inverse hyperbolic sine (IHS) transformation</strong> to a variable. The IHS transformation is used to deal with data that has skewness or includes zeros and negative values, making it a useful alternative to the <strong data-start="266" data-end="288">log transformation</strong>.</p>
<h3 data-start="291" data-end="311"><strong data-start="295" data-end="311">Why use IHS?</strong></h3>
<ol data-start="312" data-end="845">
<li data-start="312" data-end="505"><strong data-start="315" data-end="351">Handles Zero and Negative Values</strong>: Unlike the natural logarithm (<code data-start="383" data-end="390">ln(x)</code>), which is undefined for zero and negative numbers, the IHS transformation can be applied to the entire real line.</li>
<li data-start="506" data-end="708"><strong data-start="509" data-end="542">Similar to Log Transformation</strong>: For large values of <code data-start="564" data-end="567">x</code>, the IHS transformation behaves similarly to the log transformation (<code data-start="637" data-end="644">ln(x)</code>), making it useful for dealing with right-skewed distributions.</li>
<li data-start="709" data-end="845"><strong data-start="712" data-end="732">Reduces Skewness</strong>: It helps in normalizing highly skewed data, improving the interpretability and efficiency of regression models.</li>
</ol>
<p> </p>
<p>STATA CODE:</p>
<p>gen ihs_var = ihstrans(variable)</p>
<p>gen ihs_income = ihstrans(income)</p>
<p>This sample code will create a new variable <code data-start="1368" data-end="1380">ihs_income</code> that contains the IHS-transformed values of <code data-start="1425" data-end="1433">income VARIAable. </code></p>]]></content:encoded>
						                            <category domain="https://axeusce.com/community-4/disscussion-2/">STATA Programming</category>                        <dc:creator>mdyasarsattar</dc:creator>
                        <guid isPermaLink="true">https://axeusce.com/community-4/disscussion-2/what-is-ihstrans-inverse-hyperbolic-sine-ihs-transformation-in-stata-and-why-we-use-ihs/</guid>
                    </item>
				                    <item>
                        <title>Nearest Neighbor Matching vs Other Types in Stata</title>
                        <link>https://axeusce.com/community-4/disscussion-2/nearest-neighbor-matching-vs-other-types-in-stata/</link>
                        <pubDate>Wed, 05 Mar 2025 17:22:08 +0000</pubDate>
                        <description><![CDATA[Types of Matching in Stata
Matching methods are used to reduce selection bias in observational studies by pairing treated and control units based on their propensity scores. The most common...]]></description>
                        <content:encoded><![CDATA[<h3 data-start="0" data-end="34"><strong data-start="4" data-end="34">Types of Matching in Stata</strong></h3>
<p data-start="35" data-end="239">Matching methods are used to reduce selection bias in observational studies by pairing treated and control units based on their propensity scores. The most common matching techniques in <strong data-start="221" data-end="230">Stata</strong> include:</p>
<ol data-start="241" data-end="398">
<li data-start="241" data-end="280"><strong data-start="244" data-end="278">Nearest Neighbor (NN) Matching</strong></li>
<li data-start="281" data-end="306"><strong data-start="284" data-end="304">Caliper Matching</strong></li>
<li data-start="307" data-end="331"><strong data-start="310" data-end="329">Kernel Matching</strong></li>
<li data-start="332" data-end="356"><strong data-start="335" data-end="354">Radius Matching</strong></li>
<li data-start="357" data-end="398"><strong data-start="360" data-end="396">Stratification/Interval Matching</strong></li>
</ol>
<p data-start="400" data-end="450">Each method has its own advantages and trade-offs.</p>
<h2 data-start="457" data-end="497"><strong data-start="460" data-end="497">1. Nearest Neighbor (NN) Matching</strong></h2>
<h3 data-start="498" data-end="513"><strong data-start="502" data-end="513">Concept</strong></h3>
<ul data-start="514" data-end="700">
<li data-start="514" data-end="605">Each treated unit is matched with the control unit that has the closest propensity score.</li>
<li data-start="606" data-end="648">Can be done with or without replacement.</li>
<li data-start="649" data-end="700">Can specify <strong data-start="663" data-end="673">1-to-1</strong> or <strong data-start="677" data-end="690">1-to-many</strong> matching.<br />mplementation in Stata (<code data-start="733" data-end="743">psmatch2</code>)<br />psmatch2 treatment covariates, outcome(outcome_var) neighbor(1)<br /><br /></li>
<li data-start="824" data-end="902"><code data-start="826" data-end="839">neighbor(1)</code>: Matches each treated unit to the single closest control unit.</li>
</ul>
<code data-start="905" data-end="918">neighbor(3)</code>: Matches each treated unit to the <strong data-start="953" data-end="962">three</strong> closest control units (1-to-3 matching).<br />
<p data-start="1222" data-end="1520"> </p>
<h2 data-start="1527" data-end="1553"><strong data-start="1530" data-end="1553">2. Caliper Matching</strong></h2>
<h3 data-start="1554" data-end="1569"><strong data-start="1558" data-end="1569">Concept</strong></h3>
<ul data-start="1570" data-end="1770">
<li data-start="1570" data-end="1682">Similar to <strong data-start="1583" data-end="1598">NN matching</strong>, but imposes a <strong data-start="1614" data-end="1644">maximum allowed difference</strong> in propensity scores (the "caliper").</li>
<li data-start="1683" data-end="1770">Helps avoid <strong data-start="1697" data-end="1713">poor matches</strong> by ensuring that matched units are sufficiently similar.<br /><br />psmatch2 treatment covariates, outcome(outcome_var) neighbor(1) caliper(0.05)<br /><code data-start="1910" data-end="1925">caliper(0.05)</code>: Ensures that control units are within 0.05 propensity score of the treated unit.<br /><br />
<h2 style="text-align: left" data-start="2301" data-end="2326"><strong data-start="2304" data-end="2326">3. Kernel Matching</strong></h2>
<h3 style="text-align: left" data-start="2327" data-end="2342"><strong data-start="2331" data-end="2342">Concept</strong></h3>
<ul style="text-align: left" data-start="2343" data-end="2575">
<li data-start="2343" data-end="2488">Instead of picking <strong data-start="2364" data-end="2388">one nearest neighbor</strong>, Kernel Matching <strong data-start="2406" data-end="2437">uses multiple control units</strong> and assigns them weights based on their closeness.</li>
<li style="text-align: left" data-start="2489" data-end="2575"><strong data-start="2491" data-end="2515">Treated unit outcome</strong> is compared to a <strong data-start="2533" data-end="2553">weighted average</strong> of the control group.<br /><br />psmatch2 treatment covariates, outcome(outcome_var) kernel<br /><br /><span style="font-size: 14pt"><strong data-start="3081" data-end="3103"><br />4. Radius Matching</strong></span>
<h3 style="text-align: left" data-start="3104" data-end="3119"><strong data-start="3108" data-end="3119">Concept :</strong></h3>
<ul style="text-align: left" data-start="2343" data-end="2575">
<li style="text-align: left" data-start="2489" data-end="2575">Each treated unit is matched with <strong data-start="3156" data-end="3177">all control units</strong> within a certain distance (radius) in propensity score space.</li>
</ul>
<h3 style="text-align: left" data-start="3104" data-end="3119"><strong data-start="3108" data-end="3119"> </strong><span style="font-size: 14px">psmatch2 treatment covariates, outcome(outcome_var) radius caliper(0.05)</span></h3>
<code data-start="3374" data-end="3389">caliper(0.05)</code>: Includes all control units within 0.05 propensity score. <br /><br /><br /></li>
</ul>
</li>
</ul>
<h2 data-start="3790" data-end="3834"><strong data-start="3793" data-end="3834">5. Stratification (Interval) Matching</strong></h2>
<h3 data-start="3835" data-end="3850"><strong data-start="3839" data-end="3850">Concept</strong></h3>
<ul data-start="3851" data-end="4030">
<li data-start="3851" data-end="3973">The <strong data-start="3857" data-end="3912">propensity score is divided into intervals (strata)</strong>, and treated/control units are compared within each stratum.</li>
<li style="text-align: left" data-start="3974" data-end="4030">Works similarly to <strong data-start="3995" data-end="4029">coarsened exact matching (CEM)</strong>.<br /><br />psmatch2 treatment covariates, outcome(outcome_var) strata(5)<br /><code data-start="4154" data-end="4165">strata(5)</code>: Divides the propensity score into 5 groups.<br /><br />
<h2 data-start="5332" data-end="5375"><strong data-start="5335" data-end="5375">Comparison Table of Matching Methods</strong></h2>
<table data-start="5377" data-end="6123">
<thead data-start="5377" data-end="5451">
<tr data-start="5377" data-end="5451">
<th data-start="5377" data-end="5396"><strong data-start="5379" data-end="5389">Method</strong></th>
<th data-start="5396" data-end="5416"><strong data-start="5398" data-end="5415">Matching Type</strong></th>
<th data-start="5416" data-end="5432"><strong data-start="5418" data-end="5431">Strengths</strong></th>
<th data-start="5432" data-end="5451"><strong data-start="5434" data-end="5449">Limitations</strong></th>
</tr>
</thead>
<tbody data-start="5523" data-end="6123">
<tr data-start="5523" data-end="5658">
<td><strong data-start="5525" data-end="5550">Nearest Neighbor (NN)</strong></td>
<td>1-to-1 or 1-to-many</td>
<td>Easy to interpret, real units used</td>
<td>Bad matches possible, may drop many controls</td>
</tr>
<tr data-start="5659" data-end="5754">
<td><strong data-start="5661" data-end="5681">Caliper Matching</strong></td>
<td>NN with a threshold</td>
<td>Prevents poor matches</td>
<td>May drop treated units</td>
</tr>
<tr data-start="5755" data-end="5871">
<td><strong data-start="5757" data-end="5776">Kernel Matching</strong></td>
<td>Weighted average of controls</td>
<td>Uses all data, reduces variance</td>
<td>Computationally intensive</td>
</tr>
<tr data-start="5872" data-end="5983">
<td><strong data-start="5874" data-end="5893">Radius Matching</strong></td>
<td>Multiple matches within a range</td>
<td>More control units per treated</td>
<td>Sample size varies</td>
</tr>
<tr data-start="5984" data-end="6123">
<td><strong data-start="5986" data-end="6013">Stratification Matching</strong></td>
<td>Groups by propensity score strata</td>
<td>Retains most data, simple to apply</td>
<td>Assumes similarity within strata</td>
</tr>
</tbody>
</table>
<br /><br /><br /></li>
</ul>
<h2 data-start="5331" data-end="5375"><strong data-start="5334" data-end="5375">Which Matching Method Should You Use?</strong></h2>
<ul data-start="5376" data-end="5720">
<li data-start="5376" data-end="5443"><strong data-start="5378" data-end="5409">If you want simple matching</strong> → <strong data-start="5412" data-end="5441">Nearest Neighbor Matching</strong></li>
<li data-start="5444" data-end="5508"><strong data-start="5446" data-end="5483">If you want to avoid poor matches</strong> → <strong data-start="5486" data-end="5506">Caliper Matching</strong></li>
<li data-start="5509" data-end="5572"><strong data-start="5511" data-end="5548">If you have a large control group</strong> → <strong data-start="5551" data-end="5570">Kernel Matching</strong></li>
<li data-start="5573" data-end="5646"><strong data-start="5575" data-end="5622">If you want a balance between NN and Kernel</strong> → <strong data-start="5625" data-end="5644">Radius Matching</strong></li>
<li data-start="5647" data-end="5720"><strong data-start="5649" data-end="5688">If you prefer a stratified approach</strong> → <strong data-start="5691" data-end="5718">Stratification Matching</strong></li>
</ul>
<h3 data-start="0" data-end="30"><strong data-start="4" data-end="28">Summary &amp; Conclusion</strong></h3>
<p data-start="31" data-end="1110" data-is-last-node="" data-is-only-node="">Propensity Score Matching (PSM) methods in Stata help reduce selection bias in observational studies by balancing treated and control groups based on their propensity scores. <strong data-start="206" data-end="240" data-is-only-node="">Nearest Neighbor Matching (NN)</strong> is the simplest method, pairing each treated unit with the closest control, but may lead to poor matches. <strong data-start="347" data-end="367">Caliper Matching</strong> improves upon NN by restricting matches within a specified range, preventing extreme differences. <strong data-start="466" data-end="485">Kernel Matching</strong> and <strong data-start="490" data-end="509">Radius Matching</strong> use multiple control units per treated unit, reducing variance but requiring careful selection of bandwidth or caliper. <strong data-start="630" data-end="657">Stratification Matching</strong> divides the sample into propensity score bins, ensuring comparability within each group. Choosing the right method depends on the dataset and research goals—NN is intuitive but risky, Caliper reduces bias at the cost of sample size, Kernel and Radius improve precision but are computationally complex, and Stratification offers a structured approach. Regardless of the method, researchers should check balance and common support to validate results. &#x1f680;</p>]]></content:encoded>
						                            <category domain="https://axeusce.com/community-4/disscussion-2/">STATA Programming</category>                        <dc:creator>Dr. Rahima Noor</dc:creator>
                        <guid isPermaLink="true">https://axeusce.com/community-4/disscussion-2/nearest-neighbor-matching-vs-other-types-in-stata/</guid>
                    </item>
				                    <item>
                        <title>IPW vs PsMatch vs PsMatch 2 module</title>
                        <link>https://axeusce.com/community-4/disscussion-2/ipw-vs-psmatch-vs-psmatch-2-module/</link>
                        <pubDate>Wed, 05 Mar 2025 17:01:06 +0000</pubDate>
                        <description><![CDATA[In Stata, IPW (Inverse Probability Weighting), psmatch, and psmatch2 are all methods used for propensity score analysis, but they serve slightly different purposes. Here&#039;s how they compare:...]]></description>
                        <content:encoded><![CDATA[<p>In Stata, <strong data-start="10" data-end="76">IPW (Inverse Probability Weighting), <code data-start="49" data-end="58">psmatch</code>, and <code data-start="64" data-end="74" data-is-only-node="">psmatch2</code></strong> are all methods used for propensity score analysis, but they serve slightly different purposes. Here's how they compare:</p>
<h3 data-start="204" data-end="250">1. <strong data-start="211" data-end="250">IPW (Inverse Probability Weighting)</strong></h3>
<ul>
<li data-start="251" data-end="389"><strong data-start="253" data-end="264">Concept</strong>: Weights each observation by the inverse of the probability of receiving treatment, based on the estimated propensity score.</li>
<li data-start="390" data-end="490"><strong data-start="392" data-end="404">Use case</strong>: Creates a pseudo-population where treatment assignment is independent of covariates.</li>
<li data-start="491" data-end="865"><strong data-start="493" data-end="520">Implementation in Stata</strong>:<br />Estimate propensity scores using <code data-start="559" data-end="566">logit</code> or <code data-start="570" data-end="578">probit <br />logit treatment covariates<br />predict ps, pr</code></li>
<li><strong data-start="868" data-end="881">Strengths</strong>
<ul data-start="885" data-end="1010">
<li data-start="885" data-end="945">Uses the entire dataset (no need to drop unmatched units).</li>
<li data-start="948" data-end="1010">Can handle high-dimensional covariates better than matching.</li>
</ul>
</li>
<li data-start="1011" data-end="1083"><strong data-start="1013" data-end="1028">Limitations</strong>:</li>
<li>Sensitive to extreme weights (requires trimming).</li>
</ul>
<h3 data-start="1090" data-end="1134">2. <strong data-start="1097" data-end="1134"><code data-start="1099" data-end="1108">psmatch</code> (Official Stata Module)</strong></h3>
<ul data-start="1135" data-end="1586">
<li data-start="1135" data-end="1222"><strong data-start="1137" data-end="1148">Concept</strong>: Performs nearest neighbor matching based on estimated propensity scores.</li>
<li data-start="1223" data-end="1308"><strong data-start="1225" data-end="1237">Use case</strong>: Compares treated and control units by selecting similar observations.</li>
<li data-start="1309" data-end="1391"><strong data-start="1311" data-end="1329">Implementation</strong>:
<div class="contain-inline-size rounded-md border- border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="sticky top-9 md:top-">
<div class="absolute bottom-0 right-2 flex h-9 items-center">
<div class="flex items-center rounded bg-token-sidebar-surface-primary px-2 font-sans text-xs text-token-text-secondary dark:bg-token-main-surface-secondary"><span class="" data-state="closed">psmatch treatment covariates, neighbor(1)<br /><br /></span>
<ul>
<li style="text-align: left" data-start="1392" data-end="1512"><strong data-start="1394" data-end="1407">Strengths</strong>:
<ul data-start="1411" data-end="1512">
<li data-start="1411" data-end="1461">Provides a straightforward approach to matching.</li>
<li data-start="1464" data-end="1512">Available in newer Stata versions (Stata 16+).</li>
</ul>
</li>
<li style="text-align: left" data-start="1513" data-end="1586"><strong data-start="1515" data-end="1530">Limitations</strong>:
<ul data-start="1534" data-end="1586">
<li data-start="1534" data-end="1586">Less flexible than <code data-start="1555" data-end="1565">psmatch2</code> in terms of options.</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="overflow-y-auto p-4" dir="ltr" style="text-align: left"> </div>
</div>
</li>
</ul>
<h3 data-start="1593" data-end="1636">3. <strong data-start="1600" data-end="1636"><code data-start="1602" data-end="1612">psmatch2</code> (User-Written Module)</strong></h3>
<ul data-start="1637" data-end="2201">
<li data-start="1637" data-end="1728"><strong data-start="1639" data-end="1650">Concept</strong>: An advanced matching method that extends <code data-start="1693" data-end="1702">psmatch</code> with additional features.</li>
<li data-start="1729" data-end="1834"><strong data-start="1731" data-end="1743">Use case</strong>: Provides more flexible matching, including nearest neighbor, kernel, and radius matching.</li>
<li data-start="1835" data-end="1894"><strong data-start="1837" data-end="1853">Installation</strong>:
<div class="contain-inline-size rounded-md border- border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t- h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none">ssc install psmatch2<br /><br />
<ul data-start="1637" data-end="2201">
<li data-start="2014" data-end="2140"><strong data-start="2016" data-end="2029">Strengths</strong>:
<ul data-start="2033" data-end="2140">
<li data-start="2033" data-end="2102">More matching options (e.g., multiple neighbors, caliper matching).</li>
<li data-start="2105" data-end="2140">Generates additional diagnostics.</li>
</ul>
</li>
<li data-start="2141" data-end="2201"><strong data-start="2143" data-end="2158">Limitations</strong>:
<ul data-start="2162" data-end="2201">
<li style="text-align: left" data-start="2162" data-end="2201">Requires installation (not built-in).<br /><br />
<h3 data-start="2208" data-end="2232"><strong data-start="2212" data-end="2232">Comparison Table</strong></h3>
<table data-start="2234" data-end="2644">
<thead data-start="2234" data-end="2284">
<tr data-start="2234" data-end="2284">
<th data-start="2234" data-end="2250">Method</th>
<th data-start="2250" data-end="2257">Type</th>
<th data-start="2257" data-end="2269">Strengths</th>
<th data-start="2269" data-end="2284">Limitations</th>
</tr>
</thead>
<tbody data-start="2335" data-end="2644">
<tr data-start="2335" data-end="2442">
<td><strong data-start="2337" data-end="2344">IPW</strong></td>
<td>Weighting</td>
<td>Uses full sample, better for high-dimensional data</td>
<td>Sensitive to extreme weights</td>
</tr>
<tr data-start="2443" data-end="2549">
<td><strong data-start="2445" data-end="2456">psmatch</strong></td>
<td>Matching</td>
<td>Official Stata command, simple implementation</td>
<td>Less flexible than <code data-start="2537" data-end="2547">psmatch2</code></td>
</tr>
<tr data-start="2550" data-end="2644">
<td><strong data-start="2552" data-end="2564">psmatch2</strong></td>
<td>Matching</td>
<td>More flexible, advanced matching options</td>
<td>Requires installation</td>
</tr>
</tbody>
</table>
<br /><br /><br /></li>
</ul>
</li>
</ul>
<h3 data-start="2651" data-end="2676"><strong data-start="2655" data-end="2676">Which One to Use?</strong></h3>
<ul data-start="2677" data-end="2917">
<li data-start="2677" data-end="2770">Use <strong data-start="2683" data-end="2690">IPW</strong> if you want to keep all observations and reduce selection bias using weighting.</li>
<li data-start="2771" data-end="2833">Use <strong data-start="2777" data-end="2790"><code data-start="2779" data-end="2788">psmatch</code></strong> if you prefer a simple, built-in solution.</li>
<li data-start="2834" data-end="2917">Use <strong data-start="2840" data-end="2854"><code data-start="2842" data-end="2852">psmatch2</code></strong> if you need more advanced matching techniques and diagnostics.</li>
</ul>
</div>
<div class="overflow-y-auto p-4" dir="ltr"> </div>
</div>
</li>
</ul>
<br />]]></content:encoded>
						                            <category domain="https://axeusce.com/community-4/disscussion-2/">STATA Programming</category>                        <dc:creator>Dr. Rahima Noor</dc:creator>
                        <guid isPermaLink="true">https://axeusce.com/community-4/disscussion-2/ipw-vs-psmatch-vs-psmatch-2-module/</guid>
                    </item>
				                    <item>
                        <title>teffects in Stata</title>
                        <link>https://axeusce.com/community-4/disscussion-2/teffects-in-stata/</link>
                        <pubDate>Wed, 05 Mar 2025 15:31:49 +0000</pubDate>
                        <description><![CDATA[teffects in Stata
The teffects command in Stata is used to estimate treatment effects in observational studies. It provides various methods to adjust for confounding and selection bias when...]]></description>
                        <content:encoded><![CDATA[<h3 data-start="0" data-end="27"><strong data-start="4" data-end="25">teffects in Stata</strong></h3>
<p data-start="29" data-end="233">The <code data-start="33" data-end="43">teffects</code> command in Stata is used to estimate <strong data-start="81" data-end="102">treatment effects</strong> in observational studies. It provides various methods to adjust for confounding and selection bias when estimating causal effects.<br /><span style="font-size: 10pt"><br />Example Usage in Stata</span></p>
<p data-start="1291" data-end="1331">Suppose we have the following variables:</p>
<ul data-start="1332" data-end="1455">
<li data-start="1332" data-end="1392"><strong data-start="1334" data-end="1357">Treatment variable:</strong> <code data-start="1358" data-end="1365">treat</code> (1 = treated, 0 = control)</li>
<li data-start="1393" data-end="1420"><strong data-start="1395" data-end="1416">Outcome variable:</strong> <code data-start="1417" data-end="1420">y</code></li>
<li data-start="1421" data-end="1455"><strong data-start="1423" data-end="1438">Covariates:</strong> <code data-start="1439" data-end="1443">x1</code>, <code data-start="1445" data-end="1449">x2</code>, <code data-start="1451" data-end="1455"><code data-start="1451" data-end="1455">x3<br /><br /></code></code>
<h3 data-start="323" data-end="347"><strong data-start="327" data-end="347">Types of t-tests</strong></h3>
<code data-start="1451" data-end="1455"><code data-start="1451" data-end="1455"></code></code>
<ul data-start="348" data-end="705">
<li data-start="348" data-end="460">
<p data-start="351" data-end="460"><strong data-start="351" data-end="372">One-Sample t-test</strong><br data-start="372" data-end="375" />This test compares the mean of a single group to a known value or population mean.<br />ttest varname == value</p>
</li>
<li data-start="462" data-end="584">
<p data-start="465" data-end="584"><strong data-start="465" data-end="486">Two-Sample t-test</strong><br data-start="486" data-end="489" />This compares the means of two independent groups to determine if they differ significantly.<br />ttest varname, by(groupvar)</p>
</li>
<li data-start="586" data-end="705">
<p data-start="589" data-end="705"><strong data-start="589" data-end="606">Paired t-test</strong><br data-start="606" data-end="609" />Used when you have paired data, typically before-and-after measurements on the same subjects.<br />ttest var1 == var2<br /><br /><span style="font-size: 12pt"><strong data-start="900" data-end="923">Fixed Effects Model</strong></span></p>
<p data-start="924" data-end="1133">A fixed effects model controls for unobserved characteristics that vary across units but are constant over time. This is useful when the differences between units are correlated with the independent variables.<br />In Stata, to run a fixed effects model, use the <code data-start="1183" data-end="1190">xtreg</code> command with the <code data-start="1208" data-end="1212">fe</code> option.<br />xtreg y x1 x2 x3, fe<br />Here, <code data-start="1271" data-end="1274">y</code> is the dependent variable, and <code data-start="1306" data-end="1310">x1</code>, <code data-start="1312" data-end="1316">x2</code>, and <code data-start="1322" data-end="1326">x3</code> are independent variables. The <code data-start="1358" data-end="1362">fe</code> option specifies the fixed effects model.<br /><br /></p>
<h3 data-start="1406" data-end="1434"><strong data-start="1410" data-end="1434">Random Effects Model</strong></h3>
<p data-start="1435" data-end="1645">The random effects model assumes that the unobserved differences between units are not correlated with the independent variables. It is more efficient than the fixed effects model if this assumption holds true.<br />To estimate a random effects model in Stata, use the <code data-start="1700" data-end="1707">xtreg</code> command with the <code data-start="1725" data-end="1729">re</code> option.<br />xtreg y x1 x2 x3, re</p>
<p data-start="589" data-end="705"><br /><span style="font-size: 12pt"><br /><span style="font-size: 12pt"><strong data-start="1941" data-end="1969">Interpreting the Results</strong></span></span></p>
<div class="flex max-w-full flex-col flex-grow">
<div class="min-h-8 text-message relative flex w-full flex-col items-end gap-2 whitespace-normal break-words text-start :mt-5" dir="auto" data-message-author-role="assistant" data-message-id="70a405ec-4238-43af-81a5-dcc835e50cb4" data-message-model-slug="gpt-4o-mini">
<div class="flex w-full flex-col gap-1 empty:hidden first:pt-">
<div class="markdown prose w-full break-words dark:prose-invert dark">
<p data-start="1970" data-end="2033">After running a t-test, Stata provides an output that includes:</p>
<ul data-start="2034" data-end="2245">
<li data-start="2034" data-end="2068"><strong data-start="2036" data-end="2047">t-value</strong>: The test statistic.</li>
<li data-start="2069" data-end="2153"><strong data-start="2071" data-end="2082">p-value</strong>: The probability that the observed difference is due to random chance.</li>
<li data-start="2154" data-end="2245"><strong data-start="2156" data-end="2179">Confidence Interval</strong>: The range within which the true population mean difference lies.</li>
</ul>
<h3 data-start="2247" data-end="2265"><span style="font-size: 12pt"><strong data-start="2251" data-end="2265">Conclusion</strong></span></h3>
<p data-start="2266" data-end="2496">t-tests are powerful statistical tools for comparing group means. Stata provides a straightforward approach to performing these tests, but it is essential to ensure your data meets the assumptions of the test for accurate results.Using fixed effects or random effects models in Stata can help you analyze panel data and account for time or unit-specific unobserved factors. When you add time dummies, you're accounting for time effects in your model, which could be what you're referring to by <strong data-start="3464" data-end="3477">t-effects</strong>.</p>
</div>
</div>
</div>
</div>
<div class="mb-2 flex gap-3 -ml-2">
<div class="items-center justify-start rounded-xl p-1 flex"> </div>
</div>
</li>
</ul>
<code data-start="1451" data-end="1455"></code></li>
</ul>]]></content:encoded>
						                            <category domain="https://axeusce.com/community-4/disscussion-2/">STATA Programming</category>                        <dc:creator>Dr. Rahima Noor</dc:creator>
                        <guid isPermaLink="true">https://axeusce.com/community-4/disscussion-2/teffects-in-stata/</guid>
                    </item>
				                    <item>
                        <title>Inverse Probability Weighting (IPW) vs. Propensity Score Matching (PSM)</title>
                        <link>https://axeusce.com/community-4/disscussion-2/inverse-probability-weighting-ipw-vs-propensity-score-matching-psm/</link>
                        <pubDate>Wed, 05 Mar 2025 15:13:33 +0000</pubDate>
                        <description><![CDATA[Both Inverse Probability Weighting (IPW) and Propensity Score Matching (PSM) are methods for addressing confounding in observational studies by using propensity scores. However, they differ ...]]></description>
                        <content:encoded><![CDATA[<p>Both <strong data-start="96" data-end="135">Inverse Probability Weighting (IPW)</strong> and <strong data-start="140" data-end="175">Propensity Score Matching (PSM)</strong> are methods for addressing confounding in observational studies by using propensity scores. However, they differ in how they use these scores to create balance between treatment and control groups.<br />  </p>
IPW assigns <strong data-start="1630" data-end="1641">weights</strong> to individuals based on the inverse of their <strong data-start="1687" data-end="1712">propensity score (PS)</strong>.<br />Ensures that treatment groups are <strong data-start="1750" data-end="1764">reweighted</strong> to look like a randomized experiment.<br /><br /><strong><strong><span style="font-size: 14pt">Inverse Probability Weighting (IPW)</span><br /></strong></strong>logit treat x1 x2 x3<br />predict pscore<br />This generates the propensity score (<code data-start="1938" data-end="1946">pscore</code>), i.e., the probability of receiving the treatment.<br /><br />Alternative IPW Approach Using <code data-start="2428" data-end="2442">teffects ipw</code><br />teffects ipw (y) (treat x1 x2 x3)      Automatically estimates the <strong data-start="2522" data-end="2556">Average Treatment Effect (ATE)</strong>.<br /><br />   <span style="font-size: 10pt">   <strong>Strengths of IPW :</strong></span>
<ul>
<li data-start="2559" data-end="2583">
<div style="text-align: justify"><span style="font-size: 14px">Retains </span>all observations<span style="font-size: 14px"> (unlike PSM).</span></div>
</li>
<li> Less sensitive to poor matches</li>
</ul>
<strong data-start="2633" data-end="2667"><strong data-start="2633" data-end="2667"><br /><br /><span style="font-size: 14pt">Propensity Score Matching (PSM)</span><br /></strong></strong>
<ul>
<li data-start="2967" data-end="3070">PSM <strong data-start="2973" data-end="2982">pairs</strong> individuals in the treatment and control groups based on similar <strong data-start="3048" data-end="3069">propensity scores</strong>.</li>
<li>After matching, treatment effects are estimated using <strong data-start="3127" data-end="3148">only matched data</strong>.</li>
</ul>
<br />logit treat x1 x2 x3<br />predict pscore<br /><br />
<h3 data-start="3839" data-end="3863"><span style="font-size: 10pt"><strong data-start="3843" data-end="3863">Strengths of PSM:</strong></span></h3>
<ul>
<li data-start="3864" data-end="4001"> Ensures <strong data-start="3874" data-end="3896">high comparability</strong> between treated and control groups.</li>
<li>Does <strong data-start="3942" data-end="3971">not rely on extrapolation</strong>, reducing model dependence.</li>
</ul>
<br />
<h1 data-start="4192" data-end="4229"><strong data-start="4194" data-end="4229">Key Differences: IPW vs. PSM</strong></h1>
<table data-start="4230" data-end="4681">
<thead data-start="4230" data-end="4276">
<tr data-start="4230" data-end="4276">
<th data-start="4230" data-end="4255">Feature</th>
<th data-start="4255" data-end="4265"><strong data-start="4257" data-end="4264">IPW</strong></th>
<th data-start="4265" data-end="4276"><strong data-start="4267" data-end="4274">PSM</strong></th>
</tr>
</thead>
<tbody data-start="4322" data-end="4681">
<tr data-start="4322" data-end="4394">
<td><strong data-start="4324" data-end="4353">Retains all observations?</strong></td>
<td>&#x2705; Yes</td>
<td>&#x274c; No (drops unmatched cases)</td>
</tr>
<tr data-start="4395" data-end="4448">
<td><strong data-start="4397" data-end="4415">Estimates ATE?</strong></td>
<td>&#x2705; Yes</td>
<td>&#x274c; No (estimates ATT)</td>
</tr>
<tr data-start="4449" data-end="4498">
<td><strong data-start="4451" data-end="4481">Sensitive to Poor Matches?</strong></td>
<td>&#x274c; No</td>
<td>&#x2705; Yes</td>
</tr>
<tr data-start="4499" data-end="4551">
<td><strong data-start="4501" data-end="4534">Sensitive to Extreme Weights?</strong></td>
<td>&#x2705; Yes</td>
<td>&#x274c; No</td>
</tr>
<tr data-start="4552" data-end="4606">
<td><strong data-start="4554" data-end="4589">More Computationally Expensive?</strong></td>
<td>&#x274c; No</td>
<td>&#x2705; Yes</td>
</tr>
<tr data-start="4607" data-end="4681">
<td><strong data-start="4609" data-end="4638">Better for Small Samples?</strong></td>
<td>&#x274c; No (weights can be unstable)</td>
<td>&#x2705; Yes</td>
</tr>
</tbody>
</table>
<br />
<h3 style="text-align: left" data-start="6219" data-end="6247"><strong data-start="6223" data-end="6247">SUMMERY: <br /></strong> Inverse Probability Weighting (IPW) and Propensity Score Matching (PSM) are both methods for addressing confounding in observational studies using propensity scores. IPW assigns weights to individuals based on the inverse of their probability of receiving treatment, ensuring all observations are retained and enabling the estimation of the Average Treatment Effect (ATE). However, it can suffer from instability due to extreme weights. In contrast, PSM matches treated and control units based on similar propensity scores, improving comparability but discarding unmatched observations, which can reduce sample size. While IPW is better for retaining data and handling high-dimensional confounders, PSM is more intuitive and less dependent on model assumptions. The choice depends on study goals—IPW for ATE estimation with full data and PSM for better-matched groups, though a combination of both can enhance robustness.<br /> <br />Final Recommendation:</h3>
<ul data-start="6248" data-end="6459">
<li data-start="6248" data-end="6318">Use IPW if you want to retain all observations and estimate ATE.</li>
<li data-start="6319" data-end="6413">Use PSM if you want a well-matched treatment/control group with fewer model assumptions.</li>
<li data-start="6414" data-end="6459">Consider combining both for robustness.</li>
</ul>
<br /><br /><br /><br />]]></content:encoded>
						                            <category domain="https://axeusce.com/community-4/disscussion-2/">STATA Programming</category>                        <dc:creator>Dr. Rahima Noor</dc:creator>
                        <guid isPermaLink="true">https://axeusce.com/community-4/disscussion-2/inverse-probability-weighting-ipw-vs-propensity-score-matching-psm/</guid>
                    </item>
				                    <item>
                        <title>Matching Multivariate Regression vs. Propensity Score Matching (PSM)</title>
                        <link>https://axeusce.com/community-4/disscussion-2/matching-multivariate-regression-vs-propensity-score-matching-psm/</link>
                        <pubDate>Wed, 05 Mar 2025 13:24:53 +0000</pubDate>
                        <description><![CDATA[Both multivariate regression and propensity score matching (PSM) are used to adjust for confounding in observational studies, but they differ in methodology, assumptions, and applications.
...]]></description>
                        <content:encoded><![CDATA[<p>Both <strong data-start="93" data-end="120">multivariate regression</strong> and <strong data-start="125" data-end="160">propensity score matching (PSM)</strong> are used to adjust for confounding in observational studies, but they differ in methodology, assumptions, and applications.</p>
<h2 data-start="291" data-end="333"><strong data-start="294" data-end="333"><span style="font-size: 10pt">1.</span> <span style="font-size: 12pt">Multivariate Regression in Stata</span></strong></h2>
<h3 data-start="334" data-end="350"><strong data-start="338" data-end="350">Overview</strong></h3>
<ul data-start="351" data-end="611">
<li data-start="351" data-end="501"><strong data-start="353" data-end="380">Multivariate regression</strong> (typically logistic or linear regression) adjusts for confounders by including them as covariates in a regression model.</li>
<li data-start="502" data-end="611">Used when <strong data-start="514" data-end="552">treatment assignment is not random</strong> but confounders can be <strong data-start="576" data-end="597">directly included</strong> in the model.</li>
</ul>
<h3 data-start="613" data-end="662"><strong data-start="617" data-end="662">Stata Command for Multivariate Regression</strong></h3>
<p data-start="663" data-end="783">Example: Estimating the effect of <strong data-start="697" data-end="720">treatment (<code data-start="710" data-end="717">treat</code>)</strong> on <strong data-start="724" data-end="741">outcome (<code data-start="735" data-end="738">y</code>)</strong>, adjusting for covariates (<code data-start="769" data-end="781">x1, x2, x3</code>):</p>
<h4 data-start="785" data-end="832">Linear Regression (Continuous Outcome)<br />reg y treat x1 x2 x3, robust<br /><br />Logistic Regression (Binary Outcome)<br />logit y treat x1 x2 x3, robust<br /><br /></h4>
<h2 data-start="1597" data-end="1647"><span style="font-size: 12pt"><strong data-start="1600" data-end="1647">2. Propensity Score Matching (PSM) in Stata</strong></span></h2>
<h3 data-start="1648" data-end="1664"><strong data-start="1652" data-end="1664">Overview</strong></h3>
<ul data-start="1665" data-end="1897">
<li data-start="1665" data-end="1815"><strong data-start="1667" data-end="1746">PSM estimates the probability (propensity score) of receiving the treatment</strong>, then matches treated and untreated individuals with similar scores.</li>
<li data-start="1816" data-end="1897">Reduces <strong data-start="1826" data-end="1844">selection bias</strong> by creating <strong data-start="1857" data-end="1896">comparable treatment/control groups</strong>.</li>
</ul>
<h3 data-start="1899" data-end="1919"><strong data-start="1903" data-end="1919">Steps in PSM</strong></h3>
<ol data-start="1920" data-end="2196">
<li data-start="1920" data-end="2000"><strong data-start="1923" data-end="1956">Estimate the propensity score</strong> (logistic regression predicting treatment).<br />logit treat x1 x2 x3<br />predict pscore<br /><br /></li>
<li data-start="2001" data-end="2070"><strong data-start="2004" data-end="2025">Match individuals</strong> (1:1, 1:N, nearest neighbor, caliper, etc.).<br />ssc install psmatch2<br />psmatch2 treat x1 x2 x3, out(y) neighbor(1) caliper(0.05)<br /><br /></li>
<li data-start="2071" data-end="2140"><strong data-start="2074" data-end="2091">Check balance</strong> (assess covariate distributions between groups).<br />pstest x1 x2 x3, graph<br /><br /></li>
<li data-start="2141" data-end="2196"><strong data-start="2144" data-end="2173">Estimate treatment effect</strong> on the matched sample.<br />teffects psmatch (y) (treat x1 x2 x3), atet</li>
</ol>
<h2 data-start="3440" data-end="3498"><span style="font-size: 12pt"><strong data-start="3443" data-end="3498">Key Differences: Multivariate Regression vs. PSM</strong></span></h2>
<table data-start="3499" data-end="4482">
<thead data-start="3499" data-end="3588">
<tr data-start="3499" data-end="3588">
<th data-start="3499" data-end="3527">Feature</th>
<th data-start="3527" data-end="3553">Multivariate Regression</th>
<th data-start="3553" data-end="3588">Propensity Score Matching (PSM)</th>
</tr>
</thead>
<tbody data-start="3677" data-end="4482">
<tr data-start="3677" data-end="3805">
<td><strong data-start="3679" data-end="3690">Purpose</strong></td>
<td>Adjust for confounders via direct inclusion in model</td>
<td>Create a balanced treatment/control group</td>
</tr>
<tr data-start="3806" data-end="3901">
<td><strong data-start="3808" data-end="3820">Approach</strong></td>
<td>Regression-based (parametric)</td>
<td>Matching-based (non-parametric)</td>
</tr>
<tr data-start="3902" data-end="3997">
<td><strong data-start="3904" data-end="3930">Confounding Adjustment</strong></td>
<td>Directly controls for covariates</td>
<td>Matches on propensity score</td>
</tr>
<tr data-start="3998" data-end="4078">
<td><strong data-start="4000" data-end="4021">Observations Used</strong></td>
<td>Uses all available data</td>
<td>Drops unmatched cases</td>
</tr>
<tr data-start="4079" data-end="4131">
<td><strong data-start="4081" data-end="4118">Assumption of Linear Relationship</strong></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr data-start="4132" data-end="4221">
<td><strong data-start="4134" data-end="4159">Handles Non-linearity</strong></td>
<td>Requires interaction terms</td>
<td>Matches based on probability</td>
</tr>
<tr data-start="4222" data-end="4291">
<td><strong data-start="4224" data-end="4260">Sensitive to Model Specification</strong></td>
<td>Yes</td>
<td>Less than regression</td>
</tr>
<tr data-start="4292" data-end="4372">
<td><strong data-start="4294" data-end="4320">Unmeasured Confounders</strong></td>
<td>Cannot be adjusted for</td>
<td>Cannot be adjusted for</td>
</tr>
<tr data-start="4373" data-end="4482">
<td><strong data-start="4375" data-end="4395">Commonly Used In</strong></td>
<td>Observational studies, clinical trials</td>
<td>Health economics, policy evaluation</td>
</tr>
</tbody>
</table>
<h2 data-start="5476" data-end="5493"><span style="font-size: 12pt"><strong data-start="5479" data-end="5493">Summary</strong></span></h2>
<ul data-start="5494" data-end="5763">
<li data-start="5494" data-end="5605"><strong data-start="5496" data-end="5527">Use multivariate regression</strong> when <strong data-start="5533" data-end="5557">sample size is small</strong> or when you want to adjust for many covariates.</li>
<li data-start="5606" data-end="5695"><strong data-start="5608" data-end="5619">Use PSM</strong> when <strong data-start="5625" data-end="5653">selection bias is strong</strong> and you want a <strong data-start="5669" data-end="5694">matched control group</strong>.</li>
<li data-start="5696" data-end="5763"><strong data-start="5698" data-end="5731">Combining PSM with regression</strong> provides <strong data-start="5741" data-end="5762">better adjustment</strong>.</li>
</ul>]]></content:encoded>
						                            <category domain="https://axeusce.com/community-4/disscussion-2/">STATA Programming</category>                        <dc:creator>Dr. Rahima Noor</dc:creator>
                        <guid isPermaLink="true">https://axeusce.com/community-4/disscussion-2/matching-multivariate-regression-vs-propensity-score-matching-psm/</guid>
                    </item>
							        </channel>
        </rss>
		