01-05-2023
yubaraj
Fluorite | Level 6
Member since
06-29-2018
- 25 Posts
- 2 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by yubaraj
Subject Views Posted 1037 07-16-2022 08:07 PM 1067 07-16-2022 05:40 PM 445 06-29-2022 04:12 PM 8845 06-28-2022 04:47 PM 1573 06-15-2022 03:04 PM 1606 06-15-2022 01:56 PM 3631 06-14-2022 02:11 PM 8908 05-25-2022 01:34 PM 8946 05-18-2022 04:27 PM 1654 11-08-2021 02:24 PM -
Activity Feed for yubaraj
- Posted Re: assessing signifcance of time trend between groups on Statistical Procedures. 07-16-2022 08:07 PM
- Posted assessing signifcance of time trend between groups on Statistical Procedures. 07-16-2022 05:40 PM
- Posted show exact date along x-axis in survival curve on Statistical Procedures. 06-29-2022 04:12 PM
- Posted Re: Kaplan-Meier Survival Plotting Macro %NEWSURV on SAS Communities Library. 06-28-2022 04:47 PM
- Posted Re: Modified Poisson adjusted risk ratio and confidence interval estimate on Statistical Procedures. 06-15-2022 03:04 PM
- Posted Modified Poisson adjusted risk ratio and confidence interval estimate on Statistical Procedures. 06-15-2022 01:56 PM
- Posted Re: How to get estimates for categorical variables in a Modified Poisson regression - PROC Genmod on Statistical Procedures. 06-14-2022 02:11 PM
- Posted Re: Kaplan-Meier Survival Plotting Macro %NEWSURV on SAS Communities Library. 05-25-2022 01:34 PM
- Posted Re: Kaplan-Meier Survival Plotting Macro %NEWSURV on SAS Communities Library. 05-18-2022 04:27 PM
- Posted Re: Logistic model not fit for the data on Statistical Procedures. 11-08-2021 02:24 PM
- Posted Re: Logistic model not fit for the data on Statistical Procedures. 11-08-2021 01:59 PM
- Posted Re: Logistic model not fit for the data on Statistical Procedures. 11-08-2021 01:27 PM
- Posted Re: Logistic model not fit for the data on Statistical Procedures. 11-08-2021 12:36 PM
- Posted Re: Logistic model not fit for the data on Statistical Procedures. 11-05-2021 03:06 PM
- Posted Logistic model not fit for the data on Statistical Procedures. 11-05-2021 02:55 PM
- Posted Re: determining surgeon volume on Statistical Procedures. 08-11-2021 01:56 PM
- Posted Re: determining surgeon volume on Statistical Procedures. 08-11-2021 01:49 PM
- Liked Re: determining surgeon volume for Reeza. 08-11-2021 01:46 PM
- Posted Re: determining surgeon volume on Statistical Procedures. 08-09-2021 06:45 PM
- Posted How do I determine surgeon volume on Statistical Procedures. 08-09-2021 05:44 PM
-
Posts I Liked
Subject Likes Author Latest Post 2 1
07-16-2022
08:07 PM
Thank you this works. Just to confirm, I created four variables: year (1-15, which repeat for each age groups), age group, count(incidence of injuries) and population (100,000). My codes are as follows: data head_inj1;set head_inj; logp =log(population); run; proc genmod data=head_inj1; class age_group (ref="10-19"); model count =age_group year age_group*year/dist=poisson offset=logp;run; So, I will look at the p value for year*age to see which age category has a different trend compared to reference age category. By default, highest age category is the reference category but I can assign reference category in the class statement. Thank you @StatDave . Yuba
... View more
07-16-2022
05:40 PM
Hi All I have a 15 year data for incidence of head injuries expressed as (number of injuries/100,000 population) for 4 age categories. (10-20 years, 20-40 years, 40-65 year, and 65 year and above). I have 4 separate lines showing the incidence trend over time. I was asked to test the signifcance of trends between groups. In other words, is the incidence trend in 10-20 years age category is different to incidence trend in 20-40 year. I looked at the sources and there is a discussion about assessing significance of trend in one group over time. Is it correct to use proc genmod when testing for ... - SAS Support Communities Proc genmod for time trends - correct interpretation? (researchgate.net) But I was wondering if it is possible to do the test for trend difference between groups (4 categories of age or between make and female). I am using SAS 9.4 Thank you Yuba
... View more
06-29-2022
04:12 PM
Hi All I am trying to create a cumulative incidence curve showing cumulative vaccine coverage in a fixed cohort. The follow up starts at Nov 24 2017 and ends in May 23 2018. I want to show dates (last of each months and 15th of each months. i.e Nov 30, Dec 15, Dec 31 and so on along the x-axis). I am using %NEWSURV macro, but could not figure out any customization to insert dates along x-axis. I was wondering if this is possible at all. Is it possible to add manual labels or some alternate ways. I am using SAS 9.4. Thanks a lot Yuba
... View more
06-28-2022
04:47 PM
Hi @JeffMeyers Thanks for this very useful macro. I am trying to customize my x axis for the cumulative incidence curve. My cohort is a fixed cohort with a same start (Nov 24 2017) and end of follow up date (May 23 2018) for all participants. Instead of showing "number of days of follow up " along x-axis we wanted to show end date and middle date of each month. In other words, we wanted to have Nov 24 2017 (beginning), Nov 30 2017. Dec 15 2017, Dec 31 2017, Jan 15 2018 and so on in the x-axis time markers. I was hoping TIMEDX option will be helpful. please let me know.
... View more
06-15-2022
03:04 PM
Great @StatDave This modification works; I initially wrote param=ref, however, param=glm works as you mentioned in one of the previous posts. proc genmod data =xyz; class id x (ref = "5") y (ref = "M") z(ref = "Q1") / param =glm; model one_dose (event='1') = x y z/ dist = poisson link = log; repeated subject = id/ type = unstr; lsmeans x y z/ diff exp cl; run; Any idea how to assign a reference category, because it does not show results for first category as a reference category.
... View more
06-15-2022
01:56 PM
I have a binary outcome variable and covariates with multiple categories. I am trying to estimate adjusted risk ratios and confidence intervals. I reviewed previous discussions in SAS forum about this topic https://communities.sas.com/t5/Statistical-Procedures/How-to-get-categorical-variables-RR-estimates-in-PROC-GENMOD/m-p/760775 https://communities.sas.com/t5/Statistical-Procedures/RR-estimates-using-proc-Genmod-for-categorical https://academic.oup.com/aje/article/162/3/199/171116 345-2011: Using SAS® Procedures FREQ, GENMOD, LOGISTIC, and PHREG to Estimate Adjusted Relative Risks: A Case Study but these don't help when I have a covariate with multiple categories because the output it produces are not meaningful for multiple category. It works well when I use lsmeans option proc genmod data =xyz; class id x (ref = "5") y (ref = "M") z(ref = "Q1") / param =glm; model one_dose (event='1') = x y z/ dist = binomial link = log; lsmeans x y z / diff exp cl; run; but I want to use modified Poisson because prevalence of outcome is high. over 50% as a very similar study as mine used modified poisson regression. https://www.thelancet.com/action/showPdf?pii=S2468-2667%2822%2900037-8 My code is as follows; proc genmod data =xyz; class id x (ref = "5") y (ref = "M") z(ref = "Q1") / param =ref; model one_dose (event='1') = x y z/ dist = poisson link = log; repeated subject = id/ type = unstr; Estimate "RR x" x 1/exp; Estimate "RR y" y 1/exp; Estimate "RR z" z 1/exp; run; So, basically, my question is how do we write the "estimate" statements when the covariate has multiple categories and how to assign a reference category in a modified Poisson model. Thanks a lot Yuba
... View more
06-14-2022
02:11 PM
Hi @JME1 would you please share the code how you used LSmeans for the categorical variables. I was wondering if LSmeans statement can be used when I have individual level data, not the aggregate count data.
... View more
05-25-2022
01:34 PM
Great Thanks @JeffMeyers , it was an easy fix. I should have looked at the documentation more closely. I was wondering if it is possible to show faint horizontal gridlines along the Y-axis in the plot. Thanks
... View more
05-18-2022
04:27 PM
Hi @JeffMeyers I want to plot the Cumulative Incidence curve but I do not want the Hazard ratios (95%CI) and Median (95%ci) for my class variable in the plot. Is there a way to do this. Thank you Yuba
... View more
11-08-2021
02:24 PM
proc logistic data=surv1 descending;
class age_cat (param=ref ref='4') GENDER (param=ref ref='M') rural (param=ref ref='1') INC_QUINT (param=ref ref='Q5') imm_ref_status(param=ref ref='0');
model full_vaccination1 = age_cat GENDER rural INC_QUINT_2016 age_cat*imm_ref_status / risklimits selection=stepwise slentry=0.1 slstay=0.05 details aggregate=( age_cat imm_ref_status INC_QUINT rural GENDER)scale=noone;
run;
I run the model with aggregate statement, and scale=noone Deviance and Pearson GF test are both p<0.0001.
... View more
11-08-2021
01:59 PM
Thanks SteveDenham for your suggestions your approach showed that there are heterogenous odds ratios for vaccination visits by migration status depending on different age category. That means chances of vaccination by migration status is dependent on third variable (i.e) which age category you are. That means including interaction terms for migration status (imm_ref_status) and age category (age_cat) was a reasonable approach. But this still does not answer my questions. what are the alternatives when model fit is not achieved. or should I change my modelling strategy. or any other suggestions please. Thank you
... View more
11-08-2021
01:27 PM
So, this is the model I am using proc logistic data=surv descending; class age_cat(param=ref ref='4') GENDER (param=ref ref='M') rural (param=ref ref='1') INC_QUINT(param=ref ref='Q5') imm_ref_status(param=ref ref='0'); model full_vaccination1 = age_cat GENDER rural INC_QUINT imm_ref_status / risklimits lackfit selection=stepwise slentry=0.1 slstay=0.05 details lackfit; run; The result shows everything in the model is significant. However, poor model fit. Hosmer Lemesshow goodness of fit is (p<0.0001). Adding interaction term (age_cat*imm_ref_status) slightly improves the model fit but still (p<0.0001) . Adding higher order term for age as a continous variable I.e age*age, age*age*age and adding spline for 'age' also does not work. Also tried using log transformation for the age as a continuous variable also does not provide a model fit. So, my question is what are the alternatives when model fit is not achieved. or should I change my modelling strategy. or any other suggestions please. Thank you
... View more
11-08-2021
12:36 PM
Hi Probably my message was not clear. I have age information (age category) for both migrants and non migrants. 12-17 yrs, 18-29 yrs, 30-49 yrs, 50-64 yrs and 65 yrs and above. The variable I mentioned before was time since migration which was categorized into 5 categories based on how many years passsed since first migration. The hypothesis was that you will face more barriers if you are a recent migrant. Time since migration was 4 categories, and since non-migrants would not have this data, they were on the fifth category. 1. before 20 years (time since migration is >20 yrs) 2. 10-20 years ( (time since migration is 10-20 yrs) 3. 3-10 years (time since migration is 3-10 yrs) 4. last 2 years (migrated in last 2 years from the study date) 5. non-migrants I also tried merging category 1-4 (migrants) and comparison group as non-migrants. There is a significant interaction between migration status and current age category. The hosmer lemeshhow goodness of fit statistics shows poor model fit (p<0.0001) when I look at bivariate relationship between age category and vaccination by migration status there is a reverse relationship. I.e. oldest age category (65 yrs and above) have the highest vaccination rate in non-migrants whereas migrants have the lowest vaccination rate in 65 yrs and above. In fact, the relationship between age category and vacination (OUTCOME) has ' inveretd U shape ' relation, and among non-migrants is 'J' shaped relation. I have current age as a both continuous variable and categorical variable for both migrants and non-migrants. Thank you
... View more
11-05-2021
03:06 PM
The question I am trying to answer is : 1. Do immigrants have a different vaccination probability compared to non-migrants? 2. Does years since migration has an effect on vaccination? I fitted spline to age as a continuous variable in the second attempt, and did not include age as a categorical variable. Do you suggest just having migrants and non-migrants (two categories for the question 1). and model only selecting sample of immigrants for question 2.
... View more
11-05-2021
02:55 PM
Hi I am trying to compare flu vaccination coded 1 or 0 among immigrant and non-immigrant population. I have current age category, income quintile, urban/rural , gender and years since migration as variables. Years since migration has 5 categories : 1. before 20 years 2. 10-20 years 3. 3-10 years 4. last 2 years 5. non-migrants when I run a logistic regression model, using the following command proc logistic data=surv1 descending; class agecat(param=ref ref='3') GENDER (param=ref ref='M') rural (param=ref ref='0') ses(param=ref ref='4') imm_cat (param=ref ref='5'); model doc_visit(ref='0') = agecat GENDER rural ses imm_cat / risklimits lackfit selection=stepwise slentry=0.1 slstay=0.05 details lackfit; run; It gives me the nice output with all the variables showing association but, the hosmer and lemmeshow goodness of fit test shows p<0.0001. I included interaction term for age category and imm_cat it slightly improved the model (interaction is highly significant) fit but goodness of fit statistics is still p<0.0001. When I look at the cross tabulation for age category and doctor visit, the relationship among immigrants is inverted U shaped. You are more likely to get vaccine at the middle age and less likely to get if you are younger (12 years-18) or 65+. However, age and vaccination showed a 'J' shaped relation in non-immigrants. you have highest chances of vaccination if you are oldest and least chance at the middle age. I was wondering if this reverse relationship between age category and outcome among migrants and non-migrants is the cause for logistic model not fitting. Someone suggested me to include spline effect for age (age as a continuous variable) and I included "agesp" in the model but the model is still not fit. effect agesp = spline(ageyrs / naturalcubic basis=tpf(noint) knotmethod=percentiles(5)); I also tried to fit using general linear models but the same problem. am using SAS 9.4 . Apologies I can not share the data. It would be nice to hear your suggestion, Thanks Yuba
... View more