Write and run SAS programs in your web browser

Computing Means Weighted By Sample Size

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Computing Means Weighted By Sample Size

[ Edited ]

Good afternoon,

 

I am fairly new to SAS studio and I need a bit of assistance with my data set. In my data set, I am looking to compute the means for prevalence of each parasite that I have (there are seven different parasites) that is weighted by the sample size. In my data set, each study reported certain parasites that were found among their samples. As such, not every study reported each of the seven parasites and a few studies focused on only certain parasites; as such, it is not known if they actually have cases for certain parasites (for example, one study only focused on Giardia--as such, the other six parasites have an unknown prevalence, and was not included in the data set).

 

Afterwards, I desire to compare the magnitude of the outcomes between groups (groups being the parasites). I am using SAS studio at this time. How would I go about compute the mean of the prevalence for each parasite that I have that is weighted by their respective sample size? I have placed part of the screenshot as an attachment in PDF to give an example of the table that I am working with.

 

Thank you,

Anthony


Accepted Solutions
Solution
4 weeks ago
Super User
Posts: 17,963

Re: Computing Means Weighted By Sample Size

[ Edited ]

http://blogs.sas.com/content/iml/2016/01/06/weighted-mean-in-sas.html

 

There's no image or further details Smiley Sad

 


Watkins155 wrote:

Good afternoon,

 

I am fairly new to SAS studio and I need a bit of assistance with my data set. In my data set, I am looking to compute the means for prevalence of each parasite that I have (there are seven different parasites) that is weighted by the sample size. Afterwards, I desire to compare the magnitude of the outcomes between groups (groups being the parasites). I am using SAS studio at this time.

 

How would I go about compute the mean of the prevalence for each parasite that I have. Attached below is a screenshot of the data table (partially) that I have showing an example of the data set I'm working with.

 

Thank you,

Anthony


 

View solution in original post


All Replies
Solution
4 weeks ago
Super User
Posts: 17,963

Re: Computing Means Weighted By Sample Size

[ Edited ]

http://blogs.sas.com/content/iml/2016/01/06/weighted-mean-in-sas.html

 

There's no image or further details Smiley Sad

 


Watkins155 wrote:

Good afternoon,

 

I am fairly new to SAS studio and I need a bit of assistance with my data set. In my data set, I am looking to compute the means for prevalence of each parasite that I have (there are seven different parasites) that is weighted by the sample size. Afterwards, I desire to compare the magnitude of the outcomes between groups (groups being the parasites). I am using SAS studio at this time.

 

How would I go about compute the mean of the prevalence for each parasite that I have. Attached below is a screenshot of the data table (partially) that I have showing an example of the data set I'm working with.

 

Thank you,

Anthony


 

New Contributor
Posts: 3

Re: Computing Means Weighted By Sample Size

My apologies! Smiley Sad

 

I have edited the post with an attachment of the PDF. Furthermore, I have included it below in this reply.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 185 views
  • 0 likes
  • 2 in conversation