Dear Great SAS help team
I am working with longitudinal data and I need to perform logistic regression using GEE. baseline data in 2005 and follow up data in 2015. All the data has been cleaned and has been merged for all the participants with follow up data. However, I have a few questions.
In my data set, I have predictors (Fatty acids, fatty acid patterns) all
1. Predictors (Fatty acids, fatty acid patterns both dietary and plasma phospholipids) all continuous variables.
2.confounders (Gender, Urbanisation, HIVstatus, Alcohol, Tobacco, Education) are all categorical variables while (age, Energyintake and PhyAct ) are continuous variables.
3. I have outcomes ( Wtchange, BMIchange, Waistchangeand Metabolic syndrome (MetS) measures over 10 years. i.e I have data collected in 2005 and data collected in 2015. The outcomes are ten-year change.
The Underlined variables have some missing values and I cannot get results.
Questions 1. Can you create models with GEE and prospective data??
for example When analysing linear regression for cross-sectional study, and logistic regression, I was able to create models.
Model 1_crude model
Model 2- Adjusted for age and gender
Model 3_ adjusted for lifestyle factors.
I have been unable to figure out how to include that in the GEE analysis; I have been able to add only one confounder at a time, is this alright,.
proc genmod data=_2005to2015 ; class Age2015; model WTchangeInd= n3_PLASMA_2005 n6_PLASMA_2005 SCD_D9D_Plasma_2005 EFA_PLASMA_2005/ dist=bin;; repeated subject=Age2015 / type=exch covb corrw; run;
315 proc genmod data=_2005to2015 ; 316 class Age2015; 317 model WTchangeInd= n3_PLASMA_2005 n6_PLASMA_2005 SCD_D9D_Plasma_2005 EFA_PLASMA_2005/ 317! dist=bin;; 318 repeated subject=Age2015 / type=exch covb corrw; 319 run; NOTE: Class levels for some variables were not printed due to excessive size. NOTE: PROC GENMOD is modeling the probability that WTchangeInd='1'. One way to change this to model the probability that WTchangeInd='2' is to specify the DESCENDING option in the PROC statement. NOTE: Algorithm converged. NOTE: Algorithm converged. NOTE: PROCEDURE GENMOD used (Total process time): real time 0.15 seconds cpu time 0.09 seconds
When I run the data with HIVstatus as confounder;
proc genmod data=_2005to2015 desc ; class HIVstatus_2005 ; model WTchangeInd= n3_PLASMA_2005 n6_PLASMA_2005 SCD_D9D_Plasma_2005 EFA_PLASMA_2005/ dist=bin;; repeated subject=HIVstatus_2005 / type=exch covb corrw; run;
This is the result
325 proc genmod data=_2005to2015 desc ; /*exclude missing data*/; 326 class HIVstatus_2005 ; 327 model WTchangeInd= n3_PLASMA_2005 n6_PLASMA_2005 SCD_D9D_Plasma_2005 EFA_PLASMA_2005/ 327! dist=bin;; 328 repeated subject=HIVstatus_2005 / type=exch covb corrw; 329 330 run; NOTE: PROC GENMOD is modeling the probability that WTchangeInd='2'. NOTE: Algorithm converged. ERROR: A missing value was detected in the SUBJECT, WITHINSUBJECT, or LOGORVAR effect. All values of variables in these effects must be non-missing. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE GENMOD used (Total process time): real time 0.09 seconds cpu time 0.03 seconds
For me to get these results, I had to categorize the weight change into 2 categories, It was earlier in 3 categories, but with two categories I was able to get somewhere.
Question 2: Is it possible show the association 3 categories of change with predictors and confounders: For example.
I have 3 weight change categories
Cat1: weightloss
Cat2: Nochange
Cat3: Weightgain
How do I arrange my odes so that I can be able to show the association of my predictors with 1 weight loss, 2 Nochange and 3 Weightgain?
Please recommend the best way to go about this. Please be patient with me, I am very new to SAS
Very kind regards
Achieng
Please start a new topic.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.