Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • is it possible to set up a loop to obtain the expected minimum value of a set of comparisons?

    Hello! I'm trying to set a loop to obtain the minimum expected value of various comparisons, so far I have managed to obtain the minimum value of a variable using the following code:

    mata
    o = st_matrix("o")
    fr= (rowsum(o)* colsum(o)) / sum(o)
    minfr= min(fr)
    st_matrix("minfr", minfr)
    end

    when I try to set the loop to obtain the different minimal expected values changing fr for `c' the error r(1) pops up....
    Is it possible to set a loop to obtain the minimum value of n comparisons?
Working...
X