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
Entropy BalancingHi everyone, I want to examine the effect of a treatment on an observation group with a Diff-in-Diff…
Why is TFP calculated by prodest+acf+translog much bigger that TFP calculated by prodest+acf?Dear statalists: I want to use prodest to estimate TFP,but my production function is a translog-for…
Including both Industry and Country fixed effectsDear Stata Members I have seen the following model based on a paper Code: Delta Cashit= b0+ b1EPUi…
error in reshapingi have the data ----------------------- copy starting from the next line ----------------------- Co…
2SLS ProbitHello, I have a time series model where my dependent variable y is binary and one of my regressors …
Subscribe to:
Post Comments (Atom)
0 Response to Winsorizing of subsets
Post a Comment