03-27-2018
mmazariegos
Fluorite | Level 6
Member since
07-26-2017
- 7 Posts
- 4 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by mmazariegos
Subject Views Posted 8114 03-22-2018 01:16 PM 1516 03-21-2018 10:03 PM 1581 03-21-2018 12:26 AM 2606 08-03-2017 08:50 PM 2678 08-02-2017 08:22 PM 2201 07-26-2017 11:44 PM 2224 07-26-2017 06:19 PM -
Activity Feed for mmazariegos
- Liked Re: Restricted cubic splines in proportional hazard regression for Reeza. 03-22-2018 01:17 PM
- Liked Re: Restricted cubic splines in proportional hazard regression for Rick_SAS. 03-22-2018 01:17 PM
- Posted Re: Restricted cubic splines in proportional hazard regression on Graphics Programming. 03-22-2018 01:16 PM
- Posted Re: Non-linear association for proportional hazards models on Statistical Procedures. 03-21-2018 10:03 PM
- Posted Non-linear association for proportional hazards models on Statistical Procedures. 03-21-2018 12:26 AM
- Liked Re: Generalized least squares regression and fitted cubic splines for Rick_SAS. 08-07-2017 09:54 PM
- Posted Re: Generalized least squares regression and fitted cubic splines on Statistical Procedures. 08-03-2017 08:50 PM
- Liked Re: Generalized least squares regression and fitted cubic splines for Rick_SAS. 08-03-2017 08:49 PM
- Posted Generalized least squares regression and fitted cubic splines on Statistical Procedures. 08-02-2017 08:22 PM
- Posted Re: Regression with restricted cubic splines on Graphics Programming. 07-26-2017 11:44 PM
- Tagged Regression with restricted cubic splines on Graphics Programming. 07-26-2017 06:20 PM
- Tagged Regression with restricted cubic splines on Graphics Programming. 07-26-2017 06:20 PM
- Posted Regression with restricted cubic splines on Graphics Programming. 07-26-2017 06:19 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 2
03-22-2018
01:16 PM
Hi Dr. Rick, I'm assessing the association between lactation and maternal risk of diabetes and I am using the code below to run the unadjusted model, also I want to graph splines and I followed your code too, but I don't get the splines graph (please the attached document). time variable=follow_timedx_yrs case= definicion11_1 exposure= lactationbyparcat (continous and dummies) /*Unadjusted model*/ proc phreg data=diabetes2; model follow_timedx_yrs*definicion11_1(0) = lactationbyparcat_1 lactationbyparcat_2 lactationbyparcat_3 lactationbyparcat_4/rl; run; ods graphics on; proc phreg data = diabetes2 plots= (cumhaz); effect lactationbypars = spline(lactationbypar / basis=tpf(noint) NATURALCUBIC details knotmethod=rangefractions(0.05 0.50 0.95) ); model follow_timedx_yrs*definicion11_1(0) = lactationbypars/rl; run; When I run this code I don't get the HR. How can I get it? and how can specify the knots? for example at 0,6,12 and 24 months of lactation. Thanks in advance, Monica
... View more
03-21-2018
10:03 PM
Hi Ballardw, I am using the proc phreg for Cox regression model, the time variable is "follow_timedx_yrs" (person-years), the case is "definicion11_1" (values 0 and 1) and the exposure are the dummies for lactationcat. Below the code to run the unadjusted model and the output: /*Unadjusted model*/ proc phreg data=diabetes2; model follow_timedx_yrs*definicion11_1(0) = lactationcat_1 lactationcat_2 lactationcat_3 lactationcat_4/rl; run; Attached the output. I see that there is a non-linear association, I mean I would expect to have decreased risk for diabetes for the longer duration of breastfeeding, but this is not the case. Some time ago I run regression models with restricted cubic splines using the code of Dr. Rick Wicklin but now I don't know how to do it when using Cox regression models. Thanks, Monica
... View more
03-21-2018
12:26 AM
Dear all, I am trying to assess the association between breastfeeding and risk of type 2 diabetes, so far the association appears to be nonlinear. Do you know how I can assess the non-linear association when using a Cox proportional hazards regression model? Thanks, Monica
... View more
08-03-2017
08:50 PM
Thank you! The last question, using this code can I add confidence intervals? proc sort data=SplineOut;
by lactationbypar;
run;
proc sgplot data=SplineOut noautolegend;
series x=lactationbypar y=Fit / lineattrs=(thickness=3 color=red);
run;
... View more
08-02-2017
08:22 PM
Hi all, To assess the dose-response relation and evaluate the shape of the lactation per child and weight change relation I am using generalized least squares regression and fitted cubic splines with knots at the 5th, 35th, 50th, 65th, and 95th percentile of lactation per child distribution (corresponding to 2, 3, 5, 7, and 10 months). I am adjusting for age, weight at 18 years, educational level, socioeconomic status, age at menarche, age at first pregnancy, average gestational weight change, dietary pattern, physical activity and smoking status. Below the code that I am using, the issue is that I am supposed to get a graph like the one at the left side and I am getting the one that it is on your right side. Do you have any idea what it is happening? Thank you in advance, Monica ods select ANOVA ParameterEstimates SplineKnots;
proc glmselect data=merged0811dersesdiet;
effect spl = spline(lactationbypar / details naturalcubic basis=tpf(noint)
knotmethod=percentiles(5) );
model weightchange2 = spl age ep28e1c1 ep12 ep14 educatlevelm_2 educatlevelm_3 educatlevelm_9 SESM_1 SESM_2 SESM_9 gwgaverage factor1 factor2 factor3 totmet08 smkm_2 smkm_3 smkm_9/ selection=none; /* fit model by using spline effects */
output out=SplineOut predicted=Fit; /* output predicted values for graphing */
quit;
title "Restricted Cubic Spline Regression";
proc sgplot data=SplineOut noautolegend;
series x=lactationbypar y=Fit / lineattrs=(thickness=3 color=red);
run;
... View more
07-26-2017
11:44 PM
Thank you very much Reeza, It works! 'spl 1'n
... View more
07-26-2017
06:19 PM
Hi all, I want to graph the spline functions, so I create a data set to store spline basis functions, and I got the data set that is below. The issue is when I want to call the spl1-spl4 variables (In the data set appear like spl 1 spl 2 spl 3 and spl 4). The program doesn't recognize any form to call them (nor spl 1 spl 2 spl 3 spl4 neither spl_1 spl_2 spl_3 spl_4). Can anyone help me? /* Create SplineBasis = data set that contains spline basis functions */
proc glmselect data=merged0811dersesdiet outdesign(addinputvars fullmodel)=SplineBasis;
effect spl = spline(lactationbypar / naturalcubic basis=tpf(noint) knotmethod=percentiles(5));
model weightchange2 = spl / selection=none;
quit;
proc sgplot data=SplineBasis;
series x=lactationbypar y=spl1;
series x=lactationbypar y=spl2;
series x=lactationbypar y=spl3;
series x=lactationbypar y=spl4;
run;
Thanks,
... View more