Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: pick maximum,minimum, mode and median among scalars


From   Zhi Su <[email protected]>
To   statalist <[email protected]>
Subject   st: pick maximum,minimum, mode and median among scalars
Date   Tue, 9 Aug 2011 17:52:47 -0400

Dear Statalists,

  I wan to get some statistics of coefficients of the same independent
in regressions subjected to different constraints.
  For example, I run the following regression four times. Each time
the regression is subjected to a constraint. Here is the code for
regression in constraint 1.

  cnsreg y x1 x2 x3 x4,constraints(1)
  scalar b11=_b[x1]
  scalar b12=_b[x2]
  scalar b13=_b[x3]
  scalar b14=_b[x4]
  then I save the coefficients for x1, x2, x3, x4 in scalars

 Then I get a group of scalars:
  b11 b12 b13 b14 for the regression with constraint1
  b21 b22 b23 b24 for the regression with constraint2
  b31 b32 b33 b34 for the regression with constraint3
  b41 b42 b43 b44 for the regression with constraint4

  Now b11 b21 b31 b41 are all coefficients for x1. I want to determine
which one among them is maximum,minimum, mode and median of this group
of scalars.
  What if the number of constraints is over 100, how can I pick the
maximum,minimum, mode and median among a group of scalars of interest?

  Thank you!

-- 
Zhi Su
348 Holmes Hall
Northeastern University
360 Huntington Avenue
Boston, MA 02115
Office:1-617-373-2316
email:[email protected]
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index