Announcement

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

  • Saving results from multiple regressions using parmest package

    I am currently working on some multiple testing adjustments for a range of regression models that I am running on a dataset from a randomised control trial. In order to store my p values into a new datast, I was planning to use the parmest package in Stata offered by Roger Newson.

    I have set up my code as suggested here http://www.stata.com/meeting/8uk/transp1.pdf but keep getting the same error notice when trying to concatenate the output files (after dsconcat ‘tf1’ ‘tf2’ ‘tf3’): "No input data sets have been specified". Any advice on how to refine my code?

    tempfile tf1 tf2 tf3;
    parmby "regress SA_needs_CT3 TrialArm SA_needs_CT1a rural, vce(cluster ClusterID_AT1a)",label idnum(1) idstr(Unadj.) saving(`tf1',replace);
    parmby "reg SA_enough_CT3 TrialArm SA_enough_CT1a rural, vce(cluster ClusterID_AT1a)",label idnum(2) idstr(Unadj.) saving(`tf2',replace);
    parmby "reg ESS_pca_C3 TrialArm rural ESS_pca_C1, vce(cluster ClusterID_AT1a)",label idnum(3) idstr(Adj.) saving(`tf3',replace);
    dsconcat `tf1' `tf2' `tf3';
    format estimate min95 max95 %8.2f;
    sort idnum idstr parmseq;
    by idnum idstr:list parm label estimate min95 max95,noobs;

  • #2
    Sharing the response by Roger Newson:

    You might try typing `"`tf1'"' instead of `tf1', `"`tf2'"' instead of `tf2', and `"`tf3'"' instead of `tf3'. Temporary filenames generated by Stata often contain spaces, because they may be located in folders with names with spaces and other unexpected characters, depending on your operating environment. The remedy to this is usually to use double quotes like `" and "' around your macro references (such as tempfiles).
    If you type, in Stata,
    help strings
    then you should get an online help with hypertext to documentation about double quotes.
    I do not often use dsconcat nowadays. It is mostly superseded by post-2002 versions of the append command. I would usually type
    clear
    append using `"`tf1'"' `"`tf2'"' `"`tf3'"'
    instead of a dsconcat command.

    Comment

    Working...
    X