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
Perron-Vogelsang unit root test for endogenous breaksHello everyone, does anyone know if the unit root test of Perron-Vogelsang exists in stata? …
Sequential logit model with a categorical variable of interestDear all, I have intended to use seqlogit for modelling educational attainment at three different l…
Using foreach on for a subset of the dataHello, I am trying to replace missing values of ptfidelity_9_ - ptfidelity_11_ below with 0 Code: f…
bloated estimates and CIs in regression of relative survivalhi all I am using Paul Lambert's stpm2 to regress relative survival on a set of covariates. Before r…
save coefficients of interaction termHi, I have a regression of the following form: Code: ivreg2 y (c.x##i.year = c.w##i.year) i.year…
Subscribe to:
Post Comments (Atom)
0 Response to Assigning more weight to a category of a variable
Post a Comment