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
Include void in a loopHello, I coded an optimization and I would like to repeat that optimization for subsamples randomly…
Position twoway labels in between two ticksHi, What do I have? A twoway graph with a line plot and an area plot. On the x-axis are dates (from…
Compare regression coefficientsHi, I am interested in assessing the relationship between number of GP visits (IV) and wellbeing (D…
Migration analysis using "Difference in difference "Dear All, I am looking to the impact of migration on sales. Suppose we have two cities, one receiv…
Problems with Estimation of Translog Cost Function and its derivative - Error Insufficient ObservationDear Statalist members, I am new to Stata and this is my first post. I want to estimate a translog…
Subscribe to:
Post Comments (Atom)
0 Response to Assigning more weight to a category of a variable
Post a Comment