<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Inverse probability censoring weighting for selection bias using proc psmatch in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Inverse-probability-censoring-weighting-for-selection-bias-using/m-p/931441#M46428</link>
    <description>I found that this path cannot be sloved by IPW</description>
    <pubDate>Sun, 09 Jun 2024 14:42:44 GMT</pubDate>
    <dc:creator>ffgsdf</dc:creator>
    <dc:date>2024-06-09T14:42:44Z</dc:date>
    <item>
      <title>Inverse probability censoring weighting for selection bias using proc psmatch</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Inverse-probability-censoring-weighting-for-selection-bias-using/m-p/931364#M46427</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a question that it has been proposed that if a treatment causing a censoring, and if there is an unmeasured confounder associated with censoring, as well as the outcome variables. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In this case, the censoring becomes a collider, and when we analyze data with only observed participants will cause a selection bias. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I provide a figure to show this selection bias.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="圖片1.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97131iB4181FD69E305D19/image-size/medium?v=v2&amp;amp;px=400" role="button" title="圖片1.png" alt="圖片1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It has been proposed that Inverse probability censoring weighting can be used to create a pseudo population which have all population, I use it to remove the relationship between treatment and censoring. Then based on this idea, because no relationship between treatment and censoring, no selection bias will occur. However, in my results, it still has biased results. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please help me to address this issue and provide me code to obtain a unbiased result.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data t;
  call streaminit(123);
  do i = 1 to 1000000;
    /* Simulating x with probability p_x */
    p_x = 1/3;
    x = rand("bernoulli", p_x);
    
    /* Simulating u with probability p_u */
    p_u = 1/2;
    u = rand("bernoulli", p_u);

    /* Calculating the linear predictor for c from x and u */
    model_c = 0 + x * 0.811 - 0.5 * u;
    /* Logistic transformation to get probability p_c */
    p_c = exp(model_c) / (1 + exp(model_c));
    /* Simulating c using the calculated probability p_c */
    c = rand("bernoulli", p_c);
    /* Calculating the linear predictor for y from u */
	y = rand ("normal",100,15)+ u * 10;
    output;
  end;
run;

/*correct result no associaiton between x an y*/
/* Unconditional logistic regression of y on x */
proc reg data=t;
  model y = x;
run;

/*bias results*/
/* logistic regression of y on x, conditioned on c=0, a associaiton between x an y */
proc reg data=t;
where c = 0;
  model y = x;
run;

/*IPW for censoring*/
proc psmatch data=t; 
class c;
psmodel c  = x;
output out=z 
atewgt = w_c;
run; 

/*still a unbiased result, a associaiton between x an y */
proc reg data=z;
where c = 1;
model y =x;
weight w_c;
run;

/*pseudo population with all observations with weight*/
proc means sum data=z;
where c = 1;
var w_c;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jun 2024 02:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Inverse-probability-censoring-weighting-for-selection-bias-using/m-p/931364#M46427</guid>
      <dc:creator>ffgsdf</dc:creator>
      <dc:date>2024-06-08T02:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Inverse probability censoring weighting for selection bias using proc psmatch</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Inverse-probability-censoring-weighting-for-selection-bias-using/m-p/931441#M46428</link>
      <description>I found that this path cannot be sloved by IPW</description>
      <pubDate>Sun, 09 Jun 2024 14:42:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Inverse-probability-censoring-weighting-for-selection-bias-using/m-p/931441#M46428</guid>
      <dc:creator>ffgsdf</dc:creator>
      <dc:date>2024-06-09T14:42:44Z</dc:date>
    </item>
  </channel>
</rss>

