Announcement

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

  • A question on StataCorp's philosophy, in a specific case

    Suppose you want to calculate some simple averages across time, with survey weights, and plot them as a line plot with confidence intervals. Suppose you have really good reasons why you absolutely must use the command mean.
    A quick equivalent example with made-up survey weights (and apologies if there is a better dataset I could have used) would be:

    Code:
    sysuse bplong, clear
    gen fakepweights=1/runiform()
    mean bp [pweight=fakepweights], over(agegrp)
    matrix result=r(table)
    clear
    svmat result, rownames(agegroup)
    graph twoway (line b agegroup) (rcap ul ll agegroup), legend(off)
    It is puzzling to me that StataCorp did not see fit to add the simple rownames(newvar) option to svmat. Instead, users need to rely on a different package (svmat2) or leap all the way into Mata. Why? Is there some serious technical hurdle that needs to be worked around with great effort to obtain this simple added functionality from svmat? Or does StataCorp simply not think that it is of any use at all to copy matrix row names into the data table, while the column names are a must-have? Is it simply to force users to switch to Mata altogether?

  • #2
    Only StataCorp people can reply on behalf of the company.

    I am manifestly not doing that.

    But you allude to svmat2 which I wrote in 1999 and on that I can speak. I've always presumed that a lack of company interest in folding that back into official Stata was to be explained by one minor reason and one major reason. The minor reason was it was available for any user who wanted it. It didn't need official adoption. The major reason was that long before Mata was announced there was an interest in and development of what became public as Mata, but next to no fuss about that until it was released.

    Your more general question I would answer in the same way: Mata. Some of your more specific questions are fairly loaded. I've never felt "forced" to use Mata for anything. Strongly encouraged by seeing how versatile and powerful it was, yes.

    I don't think there are any technical hurdles here, just a reluctance to develop Stata's own matrix language when a much better one was in prospect.

    Again, a clear warning: this is just one user speaking.
    Last edited by Nick Cox; 08 Mar 2023, 14:57.

    Comment

    Working...
    X