09-30-2020
Dinurik
Fluorite | Level 6
Member since
03-21-2019
- 38 Posts
- 3 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by Dinurik
Subject Views Posted 802 09-30-2020 07:35 PM 858 09-30-2020 05:32 PM 889 09-30-2020 04:59 PM 1256 05-24-2020 03:53 PM 1272 05-24-2020 12:38 PM 1370 05-20-2020 07:38 PM 1399 05-20-2020 07:07 PM 1377 04-27-2020 11:06 AM 1475 04-26-2020 08:01 PM 1575 04-26-2020 04:53 PM -
Activity Feed for Dinurik
- Posted Re: From a long table with multiple missing to one row without missing on SAS Programming. 09-30-2020 07:35 PM
- Posted Re: From a long table with multiple missing to one row without missing on SAS Programming. 09-30-2020 05:32 PM
- Posted From a long table with multiple missing to one row without missing on SAS Programming. 09-30-2020 04:59 PM
- Posted Re: Create an indicator conditional on change of values within subjects on SAS Programming. 05-24-2020 03:53 PM
- Posted Re: Create an indicator conditional on change of values within subjects on SAS Programming. 05-24-2020 12:38 PM
- Posted Re: Create an indicator conditional on change of values within subjects on SAS Programming. 05-20-2020 07:38 PM
- Posted Create an indicator conditional on change of values within subjects on SAS Programming. 05-20-2020 07:07 PM
- Posted Re: Define censoring variable in longitudinal data with intermittent missingness on SAS Programming. 04-27-2020 11:06 AM
- Posted Re: Define censoring variable in longitudinal data with intermittent missingness on SAS Programming. 04-26-2020 08:01 PM
- Posted Define censoring variable in longitudinal data with intermittent missingness on SAS Programming. 04-26-2020 04:53 PM
- Posted Re: Retain value based on the condition per ID on SAS Programming. 04-03-2020 04:44 PM
- Posted Retain value based on the condition per ID on SAS Programming. 04-03-2020 04:14 PM
- Posted Re: Output dataset with parameter estimates from proc genmod on SAS Procedures. 02-10-2020 11:40 AM
- Posted Re: Output dataset with parameter estimates from proc genmod on SAS Procedures. 02-10-2020 11:21 AM
- Posted Output dataset with parameter estimates from proc genmod on SAS Procedures. 02-07-2020 05:56 PM
- Liked Re: Customize sgscatter for Rick_SAS. 08-05-2019 01:56 PM
- Liked Re: Customize sgscatter for DanH_sas. 08-05-2019 01:56 PM
- Liked Re: Customize sgscatter for DanH_sas. 08-05-2019 01:56 PM
- Posted Re: Customize sgscatter on Graphics Programming. 08-02-2019 04:30 PM
- Posted Customize sgscatter on Graphics Programming. 08-02-2019 02:15 PM
-
Posts I Liked
Subject Likes Author Latest Post 2 3 3
09-30-2020
07:35 PM
Hi @novinosrin , Thank you! I created a junk id variable through id=_n_, and it didn't occur to me that id is not supposed to change for the update statement to work. Thank you so much for the explanations!
... View more
09-30-2020
05:32 PM
Hi Reeza, Thanks! SAS returned this error message: ERROR: UPDATE statement needs a BY statement.
... View more
09-30-2020
04:59 PM
Hi All, I apologize if this has been asked before, this question is tricky to formulate, let alone find an answer in the forum. I have a table like this: data have; input theta1 theta3 sigma11 sigma13; datalines; . . . . 0.22 . . . . . . . . 0.29 . . . . . . . . 0.02 -0.02 . . . . ; run; And I need to get a table like this: all values in one row: data want; input theta1 theta3 sigma11 sigma13 ; datalines; 0.22 0.29 0.02 -0.02 ; run; I am curious if this can be done in few steps. I would appreciate any help!
... View more
05-24-2020
12:38 PM
Hi @novinosrin, Thank you so much! I wrote my one extremely inefficient code involving proc expand to compute the lagged therapy, and creating too many intermediate variables. It was so long and ugly that I didn't dare to share it. Thank you for this short and elegant beauty! Could you please refer me to any education materials where I could educate myself on this kind of programming in SAS? Thanks again!
... View more
05-20-2020
07:38 PM
Yes, sorry I haven't done that. Here is the print out of the dataset i need. Discont is the new variable. id time therapy discont 1 1 0 0 1 2 0 0 1 3 1 0 1 4 1 0 2 1 2 1 2 2 2 1 2 3 2 1 2 4 0 1 3 1 1 1 3 2 1 1 3 3 0 1 3 4 1 1 4 1 1 0 4 2 1 0 4 3 1 0 4 4 1 0
... View more
05-20-2020
07:07 PM
Hi SAS programmers, Could you please help me with this problem? I don't even know where to start learning how to do this and not sure whether it is possible. This is the data: data a; input id time therapy; cards; 1 1 0 1 2 0 1 3 1 1 4 1 2 1 2 2 2 2 2 3 2 2 4 0 3 1 1 3 2 1 3 3 0 3 4 1 4 1 1 4 2 1 4 3 1 4 4 1 ; run; I need to create a time-independent indicator variable that takes the value of 1 if subject's therapy became 0 after being 1, or 2; and 0 otherwise. So, suppose therapy=0 means no therapy, while therapies 1 and 2 are types of therapy. If 0 precedes 1 or 2, it is considered it to be normal, while if it follows 1 or 2, it means discontinuation of therapy, which required attention. I ultimately need to know how many people discontinued therapy. Is it at all possible to do in SAS? Thank you!
... View more
04-27-2020
11:06 AM
This is awesome. I checked with my actual data, it works great. Thank you!
... View more
04-26-2020
08:01 PM
Thank you so much! It is a huge help. It would take me a couple of days if not more to figure it out on my own. It worked!
... View more
04-26-2020
04:53 PM
Hi SAS Programmers, Could you please help me with this problem. Here is my data: data mydata; input id time var1 var2 @@; cards; 1 1 3 1 1 2 3 1 1 3 3 1 1 4 2 1 1 5 . . 2 1 3 1 2 2 . . 2 3 . . 2 4 2 0 2 5 . . 3 1 2 0 3 2 2 0 3 3 2 1 3 4 . . 3 5 . . ; run; I need to create a variable for censoring, so that it takes a value of 1 if a person dropped out of the study, i.e. if persons variables 1 and 2 are both missing from now on. Here is what I need to get: id time var1 var2 cens 1 1 3 1 0 1 2 3 1 0 1 3 3 1 0 1 4 2 1 0 1 5 . . 1 2 1 3 1 0 2 2 . . 0 2 3 . . 0 2 4 2 0 0 2 5 . . 1 3 1 2 0 0 3 2 2 0 0 3 3 2 1 0 3 4 . . 1 3 5 . . 1 I cannot base the calculation of "cens" on missing values, because there is intermittent missingness, so the the code: "if var1=. and var2=. then cens=1" will produce positive censoring indicator for id 2 at times 2 and 3, which is not correct. I feel like the right code will need some sorting and retain statement, but can't figure it out by myself. I would appreciate any tips or advice! Thank you!
... View more
04-03-2020
04:14 PM
Hi SAS programmers, Could you please help me with the following problem? My data is: data have; input id visit cvd; datalines; 1 1 0 1 3 0 1 5 1 1 9 0 2 3 . 2 4 1 2 5 0 2 9 . ; If a subject had cardiovascular even (CVD=1), I need them to retain CVD=1 in all subsequent visits. Data are unbalanced, measurements are taken for participants at different visits, and there are missing values. So I need to preserve missingness and zeros, unless subjects hits CVD=1, then “1” needs to be carried on until the last visit per id. Any help/tips will be highly appreciated!
... View more
02-10-2020
11:40 AM
Thanks. The SAS explanation lacks a bit of detail. Wasn't clear whether PRINMLE belongs to the model statement or repeated statement. It should be in the repeated statement in my case. This code worked. proc genmod data=mydata; class id var1 var2 var2 var4; model y = var1 var2 var3 var4 ; repeated subject=id / type=ind printmle ; ods output ParameterEstimates=gmparms; run;
... View more
02-10-2020
11:21 AM
WARNING: Output 'ParameterEstimates' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT option is not used.
... View more
02-07-2020
05:56 PM
Hi, I have been trying to output a dataset from proc genmod that would contain parameter estimates and their associated standard errors. I need to further use them to get pooled estimates from 5 imputed datasets. Here is my code: proc genmod data=mydata; weight stweight; class id var1 var2 var3 var4; model y = var1 var2 var3 var4 / dist=N link=id type3; repeated subject=id / type=ind; ods output parameterestimates=parms parminfo=info; run; When I run it, SAS almost crashes and then tells me that the output dataset has not been created. Could anyone please tell me what I am doing wrong? Thanks!
... View more