Dear Forum,
i would like to winsorize my data in order to controll/minimze the influence of outliers. My dataset consists of ROA figures for severaly companies within several industries. The ROA is listed in one variable for all companies and the industry is specified in a industry dummy variable. Given that the ROA is vastly differing between industries i dont want to winsorize directly my whole ROA variable but winsorize within the frame of each industry and use e.g. the 5 and 95% of e.g. Manufacturing for ROAs of companies within Manufacturing. I installed the winsor package and used the code
winsor ROA, p(.05) gen(ROA) if Manufacturing==1
However i get the error message r(198) "option if() not allowed". How could i then apply different Winsorization frames for subsets of variables?
Many thanks in advance!
Related Posts with Winsorizing of subsets
Comparing coefficient from two different rd models (using rd command)I have been trying to find a way to compare two coefficients from two different nonparametric rd mod…
Test for the need of squared variable specification in fixed effects model?Hello everybody, I'm running a fixed effects model on panel data and would like to test if I need t…
Using marginal effects after cprobit appropriate?Hi there, Is reporting marginal effects atmeans i.e." margins, dydx(*)" after a panel logit(clogit)…
JSON from a variable?Hi, I have quite a bit of JSON-formatted strings stored in a csv, such as the following: Code: {"…
Using Label define for a variable with many observationsHello all, I am seeking help with the following. I have a dataset that is of population projections…
Subscribe to:
Post Comments (Atom)
0 Response to Winsorizing of subsets
Post a Comment