07-05-2022
slegleye
Fluorite | Level 6
Member since
11-11-2018
- 11 Posts
- 0 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by slegleye
Subject Views Posted 2791 06-23-2022 04:18 AM 2836 06-20-2022 08:29 AM 2840 06-20-2022 08:11 AM 2912 06-15-2022 07:16 AM 2933 06-15-2022 05:53 AM 2980 06-15-2022 02:49 AM 1015 04-19-2022 03:48 PM 1088 04-19-2022 09:56 AM 2788 11-12-2018 02:38 PM 2817 11-12-2018 04:59 AM -
Activity Feed for slegleye
- Posted Re: Simulation of a variable (continuous or dichotomous) correlated to three existant variables? on Statistical Procedures. 06-23-2022 04:18 AM
- Posted Re: Simulation of a variable (continuous or dichotomous) correlated to three existant variables? on Statistical Procedures. 06-20-2022 08:29 AM
- Posted Re: Simulation of a variable (continuous or dichotomous) correlated to three existant variables? on Statistical Procedures. 06-20-2022 08:11 AM
- Posted Re: Simulation of a variable (continuous or dichotomous) correlated to three existant variables? on Statistical Procedures. 06-15-2022 07:16 AM
- Posted Re: Simulation of a variable (continuous or dichotomous) correlated to three existant variables? on Statistical Procedures. 06-15-2022 05:53 AM
- Posted Simulation of a variable (continuous or dichotomous) correlated to three existant variables? on Statistical Procedures. 06-15-2022 02:49 AM
- Posted Re: Choose divisor= in linear trend tests on Statistical Procedures. 04-19-2022 03:48 PM
- Posted Choose divisor= in linear trend tests on Statistical Procedures. 04-19-2022 09:56 AM
- Tagged Choose divisor= in linear trend tests on Statistical Procedures. 04-19-2022 09:56 AM
- Tagged Choose divisor= in linear trend tests on Statistical Procedures. 04-19-2022 09:56 AM
- Posted Re: PROC SURVEYLOGISTIC and interaction: 95%CI for OR of X(=0,1) at Time=t for X*Time on New SAS User. 11-12-2018 02:38 PM
- Posted Re: PROC SURVEYLOGISTIC and interaction: 95%CI for OR of X(=0,1) at Time=t for X*Time on New SAS User. 11-12-2018 04:59 AM
- Tagged PROC SURVEYLOGISTIC and interaction: 95%CI for OR of X(=0,1) at Time=t for X*Time on New SAS User. 11-11-2018 02:43 PM
- Posted PROC SURVEYLOGISTIC and interaction: 95%CI for OR of X(=0,1) at Time=t for X*Time on New SAS User. 11-11-2018 02:42 PM
06-23-2022
04:18 AM
Thank you for your answer. You get the point: all is about the assumption regarding the causal role or U on E and Y. I explicitly want to simulate a U that causes E and Y (as given in the dataset) but independantly of the observed covariates X ; and not a collider. If U is a collider, then my current estimation that ignores U is correct ; but if U is a confounder, it is not. In the simulation I cannot impose a direction (a causality) but only a correlation structure between U, E and Y (and X). If there is causality (U-->E and U--Y) then I would observe the correlation structure that I simulate. More precisely I intend to simulate all that is needed to get my current estimation right without X but false if U is a confounder and to estimate the amount of correlation (causal role) of U on E and Y that would produce a null causal effect of E on Y when U is taken into account. To be honest, I studied causal diagrams and Pearl's theory quite in detail but what I want to do is not in the textbooks I know. But I think it is relevant. Best,
... View more
06-20-2022
08:29 AM
Dear Michael (I hope that is the correct spelling). Thanks for your answer. Your remark about the very nature of U in my simulation task is interesting and points the difficult nature of the problem. My intention is really to simulate an unobserved confounder of E and Y. My understanding of the situation is that : if I simulate a U with chosen correlations with E and Y but no correlation with the propensity score Ps, it would have exactly the observerd properties that I would have in the case where U is a true confounder that generates E and Y (but not Ps). With such a U, I would be able to compute a causal effect of E on Y (conditionally to the covariates X that compose Ps, and U). By varying the correlations between U and E and Y, I would be able to determine the correlations that are sufficient to explain away the effect of E on Y (without U, that is, only on observables). That U is not correlated to Ps ensures that the U is the extra unmeasured variable that is sufficient to do it. I do not see what different properties would have a genuine confounder of E and Y that I miss with this method. I agree that the literature on sensitivity is abundant and proposes various approaches. I know the meaning and the computation of the E-value by VanderWeele and Ding. But the E-value is a simplification in the sense that it relies on a U with equal correlations (risk-ratios) with E and Y. I would like to make the correlations between U and E and U and Y independent. Best, another propensity score with all the information: the covariates X that compose Ps and U. The derived estimate of the effect of E on Y would be the "true" causal effect of E on Y.
... View more
06-20-2022
08:11 AM
Dear Koen. Thank you for your answere. Unfortunately, I do not have SAS VIYA 3.x or 4 or SAS/OR (Operations Research) in SAS 9.4. In addition, I am not sure that I understand correctly the code you mention. Sorry,
... View more
06-15-2022
07:16 AM
Dear Rick. Thank you for your interest. In fact, I intend to test the robustness of a causal estimation: does E, the binary exposition, really causes Y, the binary outcome? Data come from a real data set, a survey on youth (n=21000). I have E, Y, and a propensity score modeling E (conditionally on many covariates X), Ps. E and Y are binary, but Ps is continuous. the correlations between E, Y and Ps are given by the data. The covariates X are also observed in the survey ; but what about an unobserved covariate U? It is still possible that my results based on Ps and E are biased because Ps does not include U. I want to simulate an U with given correlations with E and Y, but with a null correlation with Ps. Best,
... View more
06-15-2022
05:53 AM
Thank you for your quick answer. Unfortunately, all these programs simulate all variables. My problem is that I would like to simulate one variable with given correlations to actual variable in a dataset. Do you know a way to do it ? Best,
... View more
06-15-2022
02:49 AM
Hello users. I have a dataset with three variables : one continuous, P, and two dichotomous, E and Y. I wonder how to simulate a variable (continuous or dichotomous) with given correlations with P, E and Y. Does anyone know how to do it ? Best,
... View more
04-19-2022
03:48 PM
Dear all. Thank you for the info. However, it does not answer my question. Here is the exact SAS code and output. AGE and sex are binary (17 and 18 years old ; boy vs girl) . proc genmod data=mod ; where _imputation_=1 ; ods output estimates=estimates ; class id SES(ref='4') Sex age/param=ref ; model binge3(ref='0')=sex age SES /dist=poisson link=log; repeated subject=id/type=unstr ; estimate '0 vs 4 direct' SES 1 0 0 0 -1 ; estimate 'linear Div=10' SES 2 1 0 -1 -2 /divisor=10 e ; estimate 'linear Div=1' SES 2 1 0 -1 -2 /divisor=1 e ; run ; The Contrast table is here : Label RR=exp(L Beta Lower CL Upper CL L Beta Lower CL Upper CL Pr > ChiSq 0 vs 4 direct 0.682 0.5661 0.8216 -0.3827 -0.569 -0.1965 <.0001 linear Div=10 0.9176 0.8827 0.9539 -0.086 -0.1248 -0.0472 <.0001 linear Div=1 0.4231 0.2871 0.6236 -0.8602 -1.248 -0.4723 <.0001 Coefficients for Contrast linear Div=10 Prm1 Prm2 Prm3 Prm4 Prm5 Prm6 Prm7 0 0 0 0.2 0.1 0 -0.1 Coefficients for Contrast linear Div=1 Prm1 Prm2 Prm3 Prm4 Prm5 Prm6 Prm7 0 0 0 2 1 0 -1 The result for Linear Div=1 offers me what I expect (approximately): according to the Contrast table results, the corresponding RR for being SES=0 vs SES=4 is exp(-0.086)^4=0.71. On the opposite the result for Linear Div=1 gives RR (SES=0 vs 4)= exp(-0.8602)^4=0.423, far from the "true" RR that is 0.682, based on the direct exponential of the beta coefficient exp(-0.3827). Why Div=10 gives a more accurate result ? Best,
... View more
04-19-2022
09:56 AM
Dear users and experts. I have a ordered categorical SES variable, ranked 0 ("disadvantaged") to 4 ("very privileged"). I use it as such in Modified Poisson regression using PROC GENMOD, to get Risk Ratios (RR). I would like to compute one model with : SES as categorical (classic !) and with a trend test (in the same model) like : PROC GENMOD data=pop ; class sex SES (ref='4') /param=glm ; model tobacco(ref='0')=sex age SES /dist=POISSON link=log ; repeated subject =id/type=unstr ; estimate "linear approx. of SES" SES 2 1 0 -1 -2 /divisor=1 ; estimate "linear approx. of SES" SES 2 1 0 -1 -2 /divisor=10 ; run ; I consider SES=4 (the "very privileged") as a reference and there seems to be a linear trend test : the beta coefficients for SES are, relative to the reference : SES=4 => beta4= 0 by construction SES=3 => beta3= -0.1219 (giving a risk ratio RR(3/4)=exp(-0.1219)=0.885) SES=2 =>betat2= -0.0958 (giving a RR(2/4)=0.909) SES=1 =>beta1= -0.2166 (giving a RR(1/4)=0.805) SES=0 => beta1= -0.3827 (giving RR(0 vs 4)=0.6820) If I take the exponential of the betas, I get the Risk Ratios (no problem so far). The restults for the estimates are : DIVISOR=1 : beta_d_1= -0.8602 DIVISOR=10 : beta_d_10= -0.0860. This is correct as far as I understand the documentation. But if DIVISOR=1 was correct, that is if there was a slope of beta_d_1=-0.8602 then the RR(0 vs 4) would be approximately exp(-0.8602)^4=0.4231, which is far away from the "truth" RR(0/4)=0.682. On the opposite, the result for DIVISOR=10 is : RR(0/4)=exp(0.0860)^4=0.71, that is very close to the "truth". In addition, when I compute various estimates obtain with various values of divisor= , the DIVISOR=10 provides betas and RR that minimize the quadratic differences between betas obtained from the classic estimation and those obtained from the estimate statement. In short : the command " estimate "linear approx. of SES" SES 2 1 0 -1 -2 /divisor=10 ; " provides the best linear approximation of the effect of SES. Why is it so ? Why are the estimated linear RR obtained with divisor=1 so far away from the "truth" and why are those obtained with Divisor=10 so close ? Why divisor=10 seems the best ? Thank you in advance.
... View more
11-12-2018
02:38 PM
Hello Rick, hello everybody. Thank you again. You picked up the right example in the paper by Agnelli (2014): I also read it. It concerns categorical variables and unfortunately, it does not work for continuous variables... In my case, with X*TIME, TIME being continuous and X binary, and the statement "lsmeans X*TIME/oddsratio cl diff;", I get an error message : "ERROR: Only CLASS variables allowed in this effect". Any other suggestion ?
... View more
11-12-2018
04:59 AM
Thank you, Rick. In fact I want to compute OR for a time-varying variable, at certain time points: I do time-discrete logistic regression, TIME is continuous and X is binary and time-varying. The database WORK is in person-year format : each individual in my panel (experiment) is observed (ATTRITION=0) until he/she is excluded (ATTRITION=1). For an individual who is observed n-1 times, ATTRITION has value 0 the first n-1 lines and ATTRITION has value 1 the last line at time=n when he/she is excluded. PERSONYEAR has value n-1 for this individual. If I use simply PROC LOGISTIC, I can use the ODDSRATIO statement : PROC LOGISTIC data=work ; class X/param=glm ; Model attrition(ref='0')=TIME X TIME*X PERSONYEAR ; ODDSRATIO X /AT (PERSONYEAR=1 18 36) ; RUN ; The problem is that using proc logistic provides underestimated standard errors of the OR. Using PROC SURVEYLOGISTIC with the statement CLUSTER ID (ID being the identification number of the individuals) provides correct standard errors. But it seems there is no similar statement in PROC SURVEYLOGISTIC. In PROC SURVEYLOGISTIC, it seems that the option CLODDS cannot be used with AT suboption. Or maybe I am wrong ? Best,
... View more
11-11-2018
02:42 PM
Hello everyone. I try to compute OR and 95%CI for OR for a binary variable X interacting with a continuous variable TIME (in the product X*Time) for some values of Time=t in PROC SURVEYLOGISTIC. I have SAS 9.4 TS, Level 1M5. Here is the code : proc surveylogistic data=work; cluster username ; class X /param=glm; model attrition(ref='0')=X TIME X*TIME / varadjust=morel expb rsq ; run ; There is an option in PROC LOGISTIC, but I cannot find any way for doing the same in PROC SURVEYLOGISTIC. Any suggestion is welcome !
... View more