Hello,
I have data involving auctions and contracts. My task is to find the average of the winning bids. So, I used this code to get a formula for the max bid by contract:
egen maxbid= max(bid), by(contractnum).
My problem is that the values for maxbid are repeated every time a certain contract is mentioned. For example, contract 08-492904 has 7 bidders, so the winning bid is listed 7 times. As you can see, this would create incorrect values for the mean if I did sum maxbid. So, how can I fix this error?
Related Posts with Finding a mean when values are repeated
VECM: questions on Rank and First-difference vs. LevelDear all I am using VECM for the first time so please apologise me if my questions are so basic. I …
[HELP] Merging two graphs into one?Hellow statlist- I am trying to create a graph to visually reflected the combination of data for th…
Calculate % coefficient effect after regressionHey everybody, I have a regression: Code: xtreg IMD ulc GDPpc capitalform mor sen pop pat fd van_i…
Metafunnel command - studies not displayed as expectedHi I'm using metafunnel in Stata 15.1 to plot funnel plots for a meta-analysis I'm undertaking but …
Exploring Stata mapping toolkitDear All, I want to visualise trade data showing the links between regions. Something like this (won…
Subscribe to:
Post Comments (Atom)
0 Response to Finding a mean when values are repeated
Post a Comment