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
Weak instrument issue with control function approach, in nonlinear modelsDear all, I'm applying the control function (CF) approach in a nonlinear model, the fractional resp…
The robust standard error in a fixed effects modelHi I have a question about the vce(robust) option. (the option is same with vce(cluster pid) in xtre…
Python Integration: Pandas Package Causing Stata to CloseAfter setting my python_userpath and python_exec, attempting to execute the following lines from a d…
Query about using aweight while running probit in STATADear all, I am a PhD student at the University of Canterbury, NZ. I wanted to use aweight while run…
Using esttab to create a tableHi, I am trying to create a table (example attached) using esttab command. I have run different spe…
Subscribe to:
Post Comments (Atom)
0 Response to Assigning more weight to a category of a variable
Post a Comment