Dear all,
I would like to know your opinion about the following issue: I need to create (starting from my original dataset) a series of 'fictious datasets' in which I simulate another scenario changing the distribution of a given characteristics, and then calculating (for each 'fictious dataset') the correlation matrix to see if it consistent with the one I have in the original dataset
For example, In my date I have the 20% of female and 80% of male, and I want to obtain that they are 50% and 50%.
I proceeded as follows:
- calculating the weight (50/80 for male, 50/20 for female)
- creating a new variable that assigns the value 50/80 to male and 50/20 to female
- running the code "corr soldi donna [fweight=weight]", with weight being the variable which contains the weights for male and female
Anyway, Stata gives me an error stating "may not use noninteger frequency weights", where I am wrong? Is not that the kind of weight I need to do this procedure?
Thanks a lot, best, G.
Related Posts with Assigning more weight to a category of a variable
Errors using random slope on dummy variableHello, Thank you for reading my post. I am seeking advice about the following problem: I am estimat…
IVprobit with Cluster option and F testDear Statalist users, I have a panel dataset for 15 years and my dependent variable is binary in na…
For each i, calculate median value of observations in the dataset whose value falls within an interval defined by i's valueHello! I have 430 observations, each of whom declare a GOAL time (in seconds), and whose FINISH tim…
How to select/specify variables to include in a table with descriptive statistics?Dear Stata Users, I run the following code to generate a table: Code: unab stubs : *_X local st…
replacing missing with non-missing within the same variableBelow is an example of the dataset (for some reason the columns are not lining up with the variables…
Subscribe to:
Post Comments (Atom)
0 Response to Assigning more weight to a category of a variable
Post a Comment