<?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: P for trend in Proc surveylogisitic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/P-for-trend-in-Proc-surveylogisitic/m-p/619166#M29812</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/305844"&gt;@Prest&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hello again. I want to run a logistic regression. My dependent variable is Mets and independent variable is Q (Quartiles of Dietary Inflammatory Index) (coded as 1,2,3,4) My covariates are age, Energy intake,BMI, education (coded 0, 1, 2), Alcohol(0,1), exercise (0,1),smoking(o,1) and physical exercise (0,1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveylogistic data = Project1.DII_M;
weight pooled_wt;
cluster psu;
strata kstrata;
class Q (reference = '1') educn(reference='2') smoking (reference='0') exercise (reference='1') Drinking (reference='0');
model Mets (desc) = age HE_BMI educn Drinking smoking exercise N_EN Q;
Domain sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then want to calculate p for trend. To do this, I assigned the median value (Q_median) of the variable Adj_DII in each quartile category to each participant and modeled this as a continuous variable and read off the pr&amp;gt;t as my p for trend.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following code to determine median values, assigning them to participants and running a logistic regression.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*obtaining median in each quartile*/
proc report data=Project1.DII_Q out=dii_median;
columns sex Q Adj_DII;
define sex / group "Sexe";
define Q / group "Quartile";
define Adj_DII / median;
run;

/*Assigning median value to individuals*/
data Project1.DII_M;
    set Project1.DII_Q;
	if sex=1 and Q=1 then Q_median=-1.10;
	else if sex=1 and Q=2 then Q_median=0.13;
	else if sex=1 and Q=3 then Q_median=1.13;
	else if sex=1 and Q=4 then Q_median=2.27;
	else if sex=2 and Q=1 then Q_median=-1.22;
	else if sex=2 and Q=2 then Q_median=0.10;
	else if sex=2 and Q=3 then Q_median=1.06;
	else if sex=2 and Q=4 then Q_median=2.06;
	if HE_BMI LE 18.5 then BMI_cat=0;
	else if 18.5 LT HE_BMI LT 23  then BMI_cat=1;
	else if 23 LT HE_BMI LT 25 then BMI_cat=2;
	else if HE_BMI GE 25 then BMI_cat=3;
Keep Age sex  pooled_wt kstrata psu HE_BMI educn Drinking smoking exercise N_EN Q 
Mets Hy_glu Abd_obs TG_high Low_HDL HTN Q_median Adj_DII BMI_cat ;
run;

/*obtaining p for trend..(method adopted from some paper*/
proc surveylogistic data = Project1.DII_M;
weight pooled_wt;
cluster psu;
strata kstrata;
model Mets(desc) = age HE_BMI educn Drinking smoking exercise N_EN Q_median;
Domain sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The p for trend obtained in this paper was 0.008 whereas mine is 0.09 so far from this value. I would like to know where I went wrong. I have attached my working data set.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Without seeing the paper, could be for any number of reasons. How do you expect anyone to know how your work difers from a paper when you don't provide the paper?&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2020 14:28:18 GMT</pubDate>
    <dc:creator>DWilson</dc:creator>
    <dc:date>2020-01-22T14:28:18Z</dc:date>
    <item>
      <title>P for trend in Proc surveylogisitic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/P-for-trend-in-Proc-surveylogisitic/m-p/617679#M29751</link>
      <description>&lt;P&gt;Hello again. I want to run a logistic regression. My dependent variable is Mets and independent variable is Q (Quartiles of Dietary Inflammatory Index) (coded as 1,2,3,4) My covariates are age, Energy intake,BMI, education (coded 0, 1, 2), Alcohol(0,1), exercise (0,1),smoking(o,1) and physical exercise (0,1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveylogistic data = Project1.DII_M;
weight pooled_wt;
cluster psu;
strata kstrata;
class Q (reference = '1') educn(reference='2') smoking (reference='0') exercise (reference='1') Drinking (reference='0');
model Mets (desc) = age HE_BMI educn Drinking smoking exercise N_EN Q;
Domain sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then want to calculate p for trend. To do this, I assigned the median value (Q_median) of the variable Adj_DII in each quartile category to each participant and modeled this as a continuous variable and read off the pr&amp;gt;t as my p for trend.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following code to determine median values, assigning them to participants and running a logistic regression.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*obtaining median in each quartile*/
proc report data=Project1.DII_Q out=dii_median;
columns sex Q Adj_DII;
define sex / group "Sexe";
define Q / group "Quartile";
define Adj_DII / median;
run;

/*Assigning median value to individuals*/
data Project1.DII_M;
    set Project1.DII_Q;
	if sex=1 and Q=1 then Q_median=-1.10;
	else if sex=1 and Q=2 then Q_median=0.13;
	else if sex=1 and Q=3 then Q_median=1.13;
	else if sex=1 and Q=4 then Q_median=2.27;
	else if sex=2 and Q=1 then Q_median=-1.22;
	else if sex=2 and Q=2 then Q_median=0.10;
	else if sex=2 and Q=3 then Q_median=1.06;
	else if sex=2 and Q=4 then Q_median=2.06;
	if HE_BMI LE 18.5 then BMI_cat=0;
	else if 18.5 LT HE_BMI LT 23  then BMI_cat=1;
	else if 23 LT HE_BMI LT 25 then BMI_cat=2;
	else if HE_BMI GE 25 then BMI_cat=3;
Keep Age sex  pooled_wt kstrata psu HE_BMI educn Drinking smoking exercise N_EN Q 
Mets Hy_glu Abd_obs TG_high Low_HDL HTN Q_median Adj_DII BMI_cat ;
run;

/*obtaining p for trend..(method adopted from some paper*/
proc surveylogistic data = Project1.DII_M;
weight pooled_wt;
cluster psu;
strata kstrata;
model Mets(desc) = age HE_BMI educn Drinking smoking exercise N_EN Q_median;
Domain sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The p for trend obtained in this paper was 0.008 whereas mine is 0.09 so far from this value. I would like to know where I went wrong. I have attached my working data set.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 05:24:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/P-for-trend-in-Proc-surveylogisitic/m-p/617679#M29751</guid>
      <dc:creator>Prest</dc:creator>
      <dc:date>2020-01-16T05:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: P for trend in Proc surveylogisitic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/P-for-trend-in-Proc-surveylogisitic/m-p/619166#M29812</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/305844"&gt;@Prest&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hello again. I want to run a logistic regression. My dependent variable is Mets and independent variable is Q (Quartiles of Dietary Inflammatory Index) (coded as 1,2,3,4) My covariates are age, Energy intake,BMI, education (coded 0, 1, 2), Alcohol(0,1), exercise (0,1),smoking(o,1) and physical exercise (0,1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveylogistic data = Project1.DII_M;
weight pooled_wt;
cluster psu;
strata kstrata;
class Q (reference = '1') educn(reference='2') smoking (reference='0') exercise (reference='1') Drinking (reference='0');
model Mets (desc) = age HE_BMI educn Drinking smoking exercise N_EN Q;
Domain sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then want to calculate p for trend. To do this, I assigned the median value (Q_median) of the variable Adj_DII in each quartile category to each participant and modeled this as a continuous variable and read off the pr&amp;gt;t as my p for trend.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following code to determine median values, assigning them to participants and running a logistic regression.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*obtaining median in each quartile*/
proc report data=Project1.DII_Q out=dii_median;
columns sex Q Adj_DII;
define sex / group "Sexe";
define Q / group "Quartile";
define Adj_DII / median;
run;

/*Assigning median value to individuals*/
data Project1.DII_M;
    set Project1.DII_Q;
	if sex=1 and Q=1 then Q_median=-1.10;
	else if sex=1 and Q=2 then Q_median=0.13;
	else if sex=1 and Q=3 then Q_median=1.13;
	else if sex=1 and Q=4 then Q_median=2.27;
	else if sex=2 and Q=1 then Q_median=-1.22;
	else if sex=2 and Q=2 then Q_median=0.10;
	else if sex=2 and Q=3 then Q_median=1.06;
	else if sex=2 and Q=4 then Q_median=2.06;
	if HE_BMI LE 18.5 then BMI_cat=0;
	else if 18.5 LT HE_BMI LT 23  then BMI_cat=1;
	else if 23 LT HE_BMI LT 25 then BMI_cat=2;
	else if HE_BMI GE 25 then BMI_cat=3;
Keep Age sex  pooled_wt kstrata psu HE_BMI educn Drinking smoking exercise N_EN Q 
Mets Hy_glu Abd_obs TG_high Low_HDL HTN Q_median Adj_DII BMI_cat ;
run;

/*obtaining p for trend..(method adopted from some paper*/
proc surveylogistic data = Project1.DII_M;
weight pooled_wt;
cluster psu;
strata kstrata;
model Mets(desc) = age HE_BMI educn Drinking smoking exercise N_EN Q_median;
Domain sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The p for trend obtained in this paper was 0.008 whereas mine is 0.09 so far from this value. I would like to know where I went wrong. I have attached my working data set.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Without seeing the paper, could be for any number of reasons. How do you expect anyone to know how your work difers from a paper when you don't provide the paper?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 14:28:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/P-for-trend-in-Proc-surveylogisitic/m-p/619166#M29812</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2020-01-22T14:28:18Z</dc:date>
    </item>
  </channel>
</rss>

