Programming the statistical procedures from SAS

Calculate Krushall wallis and mann whitney U test using Complex sample in SAS

Reply
Learner
Posts: 1

Calculate Krushall wallis and mann whitney U test using Complex sample in SAS

[ Edited ]

Hi,

 

I am sajama. I am using DHS data for my dissertation and using SAS studio for it. I needed to calculate krushall wallis and mann whitney u test using complex sample in SAS? could you please help me on this with the codes. I am new in SAS and when I tried using surveyfreq command, something goes wrong everytime. I have already generated complex sample (CS) plan watching DHS video and I could get the frequency with CS plan but not K test, May be I am wrong somewhere in the organizing the command. 

 

I don't have idea if I should run the complex sample command and test command in one go or saparately?

I tried using the below command:

proc surveyfreq data=NDHSSAS.DHS wilcoxon plots(only)=(wilcoxonboxplot);
class HV007;
var Stunting;
where hv103=1 and HC33=1 and HC1 >=0 and HC1<=59 and HV025=1;
weight WGT;
cluster hv021;
stratum hv022;
run;

 

But could not get the result. 

I will really appreciate your help.

Thank you in advance.

Super User
Posts: 10,483

Re: Calculate Krushall wallis and mann whitney U test using Complex sample in SAS

"Something goes wrong" is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

 

When I look at the syntax reference for Surveyfreq I do not see a WILCOXON or Plots option.

 

Other potential issues involve use of strata and clusters without telling the procedure any information about the primary sampling units in the sample frame.

 

There is no Class statement is Surveyfreq. Possibly you meant By.

There is no VAR statement, TABLES requests summaries for the variable or variable combinations. or possibly you wanted Tables Stunting*HV007.

Ask a Question
Discussion stats
  • 1 reply
  • 77 views
  • 0 likes
  • 2 in conversation