Hello,
Is there a way to apply weights when using the npar1way procedure? I have continuous variables that I am trying to compare the means but some of the variables are not normally distributed and as a results will need to use a nonparametric test. I know the two sample t-test supports the use of the weight statement but how can I apply weights using the npar1way procedure?
Thanks.
You can use the FREQ command in PROC NPAR1WAY.
If that's not what you need, then please explain why weights are needed.
Thank you for your reply. I have several facilities grouped into two types and some of the facilities have high volumes while others have low volumes. I am trying to compare performance metrics between these two types of facilities and I want to weigh them based on volume per facility.
@Jep wrote:
Thank you for your reply. I have several facilities grouped into two types and some of the facilities have high volumes while others have low volumes. I am trying to compare performance metrics between these two types of facilities and I want to weigh them based on volume per facility.
Repeating my earlier comment, you can use the FREQ statement in PROC NPAR1WAY. If you don't think this is what you want, then explain further why it is not what you want, and explain what you do want.
NPAR1WAY can use a variable on the FREQ statement if that variable represents a number of occurrences (count of cases with like properties for example). If the variable is not an integer the non-integer portion is truncated to integer.
What exactly makes you think that you need Npar1way for your means? Non-normal distributions tend to have group means that look normal(ish) given groups of more than 30 or so observations.
Thank you for your reply. I have less than 30 observations and the data is highly skewed and I though performing a t-test might not give accurate results.
It sounds like you should enter the data in terms of some standardized rate, such as
Number of defects per 1000 items
or
Kilograms of waste per 100 workers.
You use the DATA step to convert from raw quantities to rates.
You can then use NPAR1WAY or some other procedure to compare the rates.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.