02-08-2021
mmhxc5
Quartz | Level 8
Member since
01-03-2019
- 61 Posts
- 13 Likes Given
- 0 Solutions
- 2 Likes Received
-
Latest posts by mmhxc5
Subject Views Posted 759 01-27-2021 10:23 AM 1050 09-23-2020 04:15 PM 952 08-06-2020 05:28 PM 1160 07-23-2020 05:29 PM 1190 07-23-2020 12:47 PM 1327 07-22-2020 05:19 PM 2178 06-24-2020 05:23 PM 2195 06-24-2020 04:01 PM 2220 06-24-2020 12:53 PM 2346 06-23-2020 10:44 AM -
Activity Feed for mmhxc5
- Got a Like for How to use black and white fill patterns for bar graphs in ODS Graphics Designer. 02-20-2024 06:48 AM
- Posted How to plot only a specific stratum from proc PHREG on Statistical Procedures. 01-27-2021 10:23 AM
- Posted How to combine multiple select statements under one PROC SQL on Statistical Procedures. 09-23-2020 04:15 PM
- Posted merge by two variables produce zero ouput observation on SAS Programming. 08-06-2020 05:28 PM
- Posted Re: choosing a value conditional on two different variables on SAS Programming. 07-23-2020 05:29 PM
- Posted Re: choosing a value conditional on two different variables on SAS Programming. 07-23-2020 12:47 PM
- Posted choosing a value conditional on two different variables on SAS Programming. 07-22-2020 05:19 PM
- Liked Re: Remove a specific letter and only the number following it for Patrick. 06-25-2020 12:18 PM
- Posted Re: Remove a specific letter and only the number following it on SAS Programming. 06-24-2020 05:23 PM
- Posted Re: Remove a specific letter and only the number following it on SAS Programming. 06-24-2020 04:01 PM
- Posted Re: Remove a specific letter and only the number following it on SAS Programming. 06-24-2020 12:53 PM
- Posted Re: Remove a specific letter and only the number following it on SAS Programming. 06-23-2020 10:44 AM
- Posted Re: Remove a specific letter and only the number following it on SAS Programming. 06-23-2020 10:37 AM
- Posted Re: Remove a specific letter and only the number following it on SAS Programming. 06-23-2020 10:23 AM
- Posted Remove a specific letter and only the number following it on SAS Programming. 06-23-2020 09:12 AM
- Posted Re: Proc tabulate does not export to excel - blank excel on New SAS User. 06-18-2020 01:35 PM
- Posted Re: Proc tabulate does not export to excel - blank excel on New SAS User. 06-17-2020 07:23 PM
- Posted Re: Proc tabulate does not export to excel - blank excel on New SAS User. 06-17-2020 06:09 PM
- Posted Re: Proc tabulate does not export to excel - blank excel on New SAS User. 06-17-2020 05:45 PM
- Posted Proc tabulate does not export to excel - blank excel on New SAS User. 06-17-2020 05:31 PM
-
Posts I Liked
Subject Likes Author Latest Post 2 4 2 1 1 -
My Liked Posts
Subject Likes Posted 1 12-17-2019 11:30 PM 1 05-03-2019 11:54 AM
06-17-2020
06:09 PM
Good catch! but that is just an error when I typed the code here. It is not in my code.
... View more
06-17-2020
05:45 PM
the last part of the code has a semicolon in the code that I am running. ods excel close;
... View more
06-17-2020
05:31 PM
Hi all, I would like to use the following code to output the proc tabulate to an excel file, but it at the end, the out is displayed in HTML and an empty excel file opens. ods excel file='D:\Softwares\data.xlsx)';
proc tabulate data=xx.data02 FORMAT=5.;
class Verification_Year Product_NUMBER;
var ID_availability;
table Verification_Year ALL, ALL ID_availability*Product_NUMBER;
run;
ods excel close The output is with a very large number of columns and maybe larger than an excel number of rows. Couldd anyone could help me to output this in an excel file - may in several sheets. Thanks,
... View more
06-17-2020
11:39 AM
Thank you for your help. The city values are not consecutive numbers. It is just a value and may be any number. Does your code account for this or in that case I need another code to do this? Also, If there are more than two cities with the same ID, but different city values, does your code handle that too?
... View more
06-17-2020
11:34 AM
Thank you for your help. Would this code add all 'city' values to the IDs? I want the first ID associated with a city to be as it is and all other IDs that are associated with other cities (any number of cities) to have the city value to be added to the ID.
... View more
06-17-2020
11:27 AM
Thank you for your comment. The reason I need to add the 'city' value to the 'ID' is that I need to have a unique ID in the data set because I after this step I will calculate the number of times an ID appeared, but since several cities used the same ID it makes the number of times an ID appeared incorrect. Each ID has other variables associated with as well. First I need to make sure that the IDs are not the same for different cities and then I will use PROC lifetest and PHREG.
... View more
06-15-2020
06:11 PM
Hi all, I have a data set where a small number of values are the same but actually they belong to different places. I want to scan the data set and if the first values are the same but the second values are different then I want to just append the second value to the values that are the same as others. Here is an example, data have; ID city 123abc 3 123abc 3 123abc 3 123abc 4 123abc 4 123abc 4 1245 dc 6 data want; ID city 123abc 3 123abc 3 123abc 3 123abc4 4 123abc4 4 123abc4 4 1245dc 6 As shown above, I want to add the city value at the end of the ID value for the city equal to 4 because I need a data set only with distinct IDs if they belong to different places.
... View more
12-17-2019
11:30 PM
1 Like
Hi all, I would like to use fill patterns instead of fill colors from the ODS graphics designer app, but I could not do it. I complete the analysis with SAS and then I use the ODS graphics designer app to plot my graphs and edit the graph styles. I googled, but I could not figure out how to use fill patterns like Journal2 style within ODS Graphics Designer. I would appreciate any help on this topic.
... View more
12-16-2019
02:30 PM
Hi all, I would like to use fill patterns instead of fill colors from the ODS graphics designer app, but I could not do it. I complete the analysis with SAS and then I use the ODS graphics designer app to plot my graphs and edit the graph styles. I googled, but I could not figure out how to use fill patterns like Journal2 style within ODS Graphics Designer. I would appreciate any help on this topic.
... View more
12-11-2019
11:21 AM
@Rick_SAS, Thank you for your wonderful reply. Here is what I want in a SAS code form. data Want;
set km;
by substructure_cond_060;
if first.substructure_cond_060 then do;
cumSum = Survival;
end;
for First step;
(Suivival 1 + Survival 2)/2; output;
for second step;
(Survival 2+ survival 3)/2; output;
for third step
(Survival 3+ survival 4)/2; output;
until the end. for last step (survival (n-1) +Survival (n))/2; output; I see that you summed Cumsum with survival which I dont want to do it. I just want to take the average of each step until the end for each group and output it to other column. Your input would be appreciated. Thanks,
... View more
12-08-2019
10:31 AM
Hi, I have a dataset of step functions generated from a survival analysis procedure. There are five groups in the dataset. I would like to generate another column in the dataset to be the average of each step for each group in order to smooth the steps. In the attached dataset the groups are the SUBSTRUCTURE_COND_060 and the step functions data are the SURVIVAL column. The first row in the smoothed column will be equal to the first data point of SURVIVAL column, the second row would be the average of the first row and the second row from SURVIVAL column and the third row to be the average of the second and third column of the SURVIVAL column until the end. I would like to do this for each group. I would be glad if someone could write this code for me. Thanks,
... View more
06-05-2019
04:14 PM
Thank you @Reeza and @Rick_SAS for your time and interest to help. The following is the code i am using. title;
proc LIFETEST method=km data=xx.WI_nbi_psc_super_ticr plots=s(cb=ep)OUTSURV=xx.PSC_Survival;* (atrisk);
TIME count*CENSOR(0);
strata SUPERSTRUCTURE_COND_059;
label count="Time in Condition Rating (Year)";
run; The data file I used in the above code is attached. The code output and graphs are attached too. I want to smooth the step curves using Kernel smoothing method and have it as an output similar to the code output and possibly overlay it on the graph. Thanks,
... View more
06-05-2019
01:26 PM
Hi all, We are using Kaplan Meier method to model bridge deterioration. What I exactly want is to get smoothed curve output for survival and deterioration as an output in order to prepare graphs in graphing software. I could not generate nice survival plots using SAS. I know smoothed curves for other methods in proc LIFETEST are available, but not available for Kaplan Meier. Could anyone give me a link to a macro or write me a macro to output the Kernel smoothed curve for Kaplan Meier data points? Thanks,
... View more
05-05-2019
12:00 PM
@Tom, Thank you for your help. You have catched my point perfectly. Here is what I want. data NBI_data;
input Structure_Number_08 Substrucuture_condition Year_built
datalines;
11700121 021 8 1910
11700121 021 8 1910
11700121 021 7 1910
11700121 021 7 1910
11700121 021 6 1910
2630 8 2012
2630 8 2012
2630 8 2012
2630 7 2012
2630 7 2012
.
.
.
;
run;
data_Nbi_Correlation;
input Old_structure_Number_008 Strucutre_number_008;
datalines
11700121 021 16349
.
.
.
;
run;
*/The data I want shall have all values renamed with new values and also keep those already with new values.*/;
Data want;
input Structure_Number_08 Substrucuture_condition Year_built
datalines;
16349 8 1910
16349 8 1910
16349 7 1910
16349 7 1910
16349 6 1910
2630 8 2012
2630 8 2012
2630 8 2012
2630 7 2012
2630 7 2012
I would be happy if you demonstrate the code based on my example. The value ( 11700121 021 ) is one value.
... View more
05-03-2019
03:10 PM
@Amirand @andreas_lds, thank you for asking more clarification. I want to replace only the Old_name and keep all the data relating to the name while changing it to the New_name. The SAS data set has Structure_Number_008 which is a mixture of Old_name and New_name such as the The Old_name is available in the excel file which correlates it to the New_name as below. I want to replace all Old_names in the SAS file if the Old_name and its New_name is available in the excel file. I just want to replace the name and keep all the data related to the Old_name with the New_name.
... View more