sas

Python equivalent of SAS raking macro [closed]

落花浮王杯 提交于 2021-02-09 15:36:53
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 9 months ago . Improve this question I was searching for raking module in python something similar to SAS raking macro. I found SAS one as below: http://www2.sas.com/proceedings/sugi25/25/st/25p258.pdf But not able to understand how it works exactly. Can anyone help me how to go about it in python

Python equivalent of SAS raking macro [closed]

萝らか妹 提交于 2021-02-09 15:25:42
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 9 months ago . Improve this question I was searching for raking module in python something similar to SAS raking macro. I found SAS one as below: http://www2.sas.com/proceedings/sugi25/25/st/25p258.pdf But not able to understand how it works exactly. Can anyone help me how to go about it in python

Python equivalent of SAS raking macro [closed]

不问归期 提交于 2021-02-09 15:20:46
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 9 months ago . Improve this question I was searching for raking module in python something similar to SAS raking macro. I found SAS one as below: http://www2.sas.com/proceedings/sugi25/25/st/25p258.pdf But not able to understand how it works exactly. Can anyone help me how to go about it in python

Python equivalent of SAS raking macro [closed]

喜你入骨 提交于 2021-02-09 15:17:12
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 9 months ago . Improve this question I was searching for raking module in python something similar to SAS raking macro. I found SAS one as below: http://www2.sas.com/proceedings/sugi25/25/st/25p258.pdf But not able to understand how it works exactly. Can anyone help me how to go about it in python

Python equivalent of SAS raking macro [closed]

做~自己de王妃 提交于 2021-02-09 15:15:01
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 9 months ago . Improve this question I was searching for raking module in python something similar to SAS raking macro. I found SAS one as below: http://www2.sas.com/proceedings/sugi25/25/st/25p258.pdf But not able to understand how it works exactly. Can anyone help me how to go about it in python

Is there a SAS function for removing respondents who are missing values for one question?

做~自己de王妃 提交于 2021-02-08 11:22:50
问题 I'm trying to run analysis on a data set relating to a particular variable, but the question was only asked to half the respondents of the survey. Is there a function in SAS that would allow me to make a new data set from the current data set, but only including those who responded to the question of interest? 回答1: data responded_Question_42; set survey_responses; where not missing(Answer_42); run; You can also use the where clause directly at the time of analysis, for example: Proc FREQ data

How to import a txt file with single quote mark in a variable and another in another variable

时光毁灭记忆、已成空白 提交于 2021-02-08 10:42:22
问题 I have a file prova.txt , which contains: 001|PROVA|MILANO|1000 002|'80S WERE GREAT|FORLI'|1100 003|'80S WERE GREAT|ROMA|1110 I'm importing it as a SAS dataset with this code: libname mylib "/my/lib"; data prova; infile '/my/lib/prova.txt' dlm='|' dsd lrecl=50 truncover; format codice $3. nome $20. luogo $20. importo 4. ; input codice :$3. nome :$20. luogo :$20. importo :4. ; run; And I get this result: As you can see, the first and the third records are imported well, whereas the second has

How to iterate through files in SAS?

寵の児 提交于 2021-02-08 06:04:35
问题 I would like to iterate through files in a particular folder, and extract substrings of their files names. Is there an easy way to do this? lib dir '.../folder'; #iterate through all files of dir and extract first five letters of file name; #open files and do some processesing, aka data steps proc steps; 回答1: Firstly, I'd point out that "dir" appears to be a misspelt libref, not a folder. If you are looking for files in a folder, you can use: %macro get_filenames(location); filename _dir_ "

How to iterate through files in SAS?

喜欢而已 提交于 2021-02-08 06:04:23
问题 I would like to iterate through files in a particular folder, and extract substrings of their files names. Is there an easy way to do this? lib dir '.../folder'; #iterate through all files of dir and extract first five letters of file name; #open files and do some processesing, aka data steps proc steps; 回答1: Firstly, I'd point out that "dir" appears to be a misspelt libref, not a folder. If you are looking for files in a folder, you can use: %macro get_filenames(location); filename _dir_ "

Generate All Unique Permutations of an Array in SAS

不羁岁月 提交于 2021-02-07 14:36:32
问题 In SAS if I have a string or an Array like the following, array x[4] $1 ('A' 'B' 'C' 'D'); I need to generate all "Unique" permutations of the elements like the following, [ABCD] [ABC] [BCD] [ACD] [ABD] [AB] [AC] [AD] [BC] [BD] [CD] [A] [B] [C] [D] Is there a function in SAS for generating all possible combinations of the array? 回答1: Assumption : I believe you are looking for combinations and not permutations , so the order does not matter, BA and AB are same thing. Use call allcomb