Hi,
I need help :), have to make a random homogeneous distribution of the observations on the basis of the amount of a given variable.
I have a set of records that must be assigned to specific entities based on certain percentages.
Example (basetable):
ID COUNT AMOUNT
1 1 300
2 1 150
3 2 500
4 1 200
5 3 700
entities and percentages
ENTITY PERCENTAGE
A 20%
B 70%
C 10%
how can I assign the correct values of COUNT and AMOUNT entities A, B and C in relation to their proportion in the most consistent and fair as possible ?
you may kindly direct me some examples?
Thank you so much , Isabel
Hi,
Hi Isabel.
Is there a rule that determines the assignment of data to groups A, B and C? Or do you want this to be random, ending up with the proportions indicated (20% of obervations in group A, etc.)?
If the latter, then AnnMaria might have the solution: http://www.thejuliagroup.com/blog/?p=2599
Proc SurveySelect is generally used for sample selection and you can specify proportions but I can't see how A/B/C tie back to your original data. Otherwise it seems a bit like three samples just stacked together.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.