I think the fix here is probably to exit Stata after installing the -somersd- package and to start a new Stata session before using the -somersd- package. This is because some versions of Stata have a problem with using Mata libraries in the same Stata session in which they were installed. The -somersd- package includes a Mata library (named -lsomersd.mlib-), and -tidotforsomersd()- is one of the modules in that library.
The reason for this problem is that, in many versions of Stata, the list of Mata libraries to search for Mata programs is defined at the start of a Stata session. If the user installs any new Mata libraries in that session, then they may not be added automatically to the list of Mata libraries to be searched, intil the user starts a new session.
I hope this helps. Let me know if it doesn't.
Best wishes
Roger
Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/
Opinions expressed are those of the author, not of the institution.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ricardo Ovaldia
Sent: 10 April 2009 01:08
To: [email protected]
Subject: RE: st: adjusted Mann-Whitney/Wilcoxon test
Thank you Roger. I would like to use -somersd-, but I keep getting an error. What am I doing wrong?
Here using the cancer data.
. which somersd
c:\ado\stbplus\s\somersd.ado
*! Author: Roger Newson
*! Date: 04 August 2008
. sysuse cancer
(Patient Survival in Drug Trial)
. somersd died age , cluster( drug )
tidotforsomersd(): 3499 tidottree() not found
<istmt>: - function returned error
r(3499);
Thank you,
Ricardo
Ricardo Ovaldia, MS
Statistician
Oklahoma City, OK
--- On Thu, 4/9/09, Newson, Roger B <[email protected]> wrote:
> From: Newson, Roger B <[email protected]>
> Subject: RE: st: adjusted Mann-Whitney/Wilcoxon test
> To: "'[email protected]'" <[email protected]>
> Date: Thursday, April 9, 2009, 3:39 PM
> As David said, the -somersd- package, downloadable from SSC,
> can estimate stratified versions of rank parameters. The
> user has a choice of parameters, which may be Kendall's
> tau-a, Somers' D, or a Theil-Sen median slope. All of
> these parameters are available in stratified versions,
> restricted to comparisons within strata defined by a
> categorical variable. And the -somersd- package has 3 .pdf
> manuals, which the user can download with the package, in
> which the methods and formulas are explained.
>
> I hope this helps.
>
> Best wishes
>
> Roger
>
>
> Roger B Newson BSc MSc DPhil
> Lecturer in Medical Statistics
> Respiratory Epidemiology and Public Health Group
> National Heart and Lung Institute
> Imperial College London
> Royal Brompton Campus
> Room 33, Emmanuel Kaye Building
> 1B Manresa Road
> London SW3 6LR
> UNITED KINGDOM
> Tel: +44 (0)20 7352 8121 ext 3381
> Fax: +44 (0)20 7351 8322
> Email: [email protected]
> Web page: http://www.imperial.ac.uk/nhli/r.newson/
> Departmental Web page:
> http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/
>
> Opinions expressed are those of the author, not of the
> institution.
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> David Airey
> Sent: 09 April 2009 18:23
> To: [email protected]
> Subject: Re: st: adjusted Mann-Whitney/Wilcoxon test
>
> To me, stratified generally means controlling for a
> non-continuous
> covariate.
>
> -Somersd- provides rank-based statistics for group
> comparisons
> allowing for strata.
>
> -Dave
>
> On Apr 9, 2009, at 10:45 AM, Constantine Daskalakis wrote:
>
> > I have the same question as Ricardo.
> >
> > By stratified, we mean controlling for another
> covariate:
> >
> > Wilcoxon of Y by X, controlling for Z
> >
> > StatXact does this stratified Wilcoxon.
> >
> >
> > David, the parallel is Mantel-Haenszel for dichotomous
> outcome.
> >
> > So, the command would look something like this:
> >
> > ranksum y x, by(z)
> >
> > or
> >
> > ranksum y, by(x) strata(z)
> >
> >
> > On 4/9/2009 10:44 AM, David Airey wrote:
> >> .
> >> If ttest generalizes to regress, then ranksum
> generalizes to what?
> >> There is a lot of literature on ranksum tests with
> clustered data
> >> if that's what you mean. Maybe you can define
> your data more
> >> precisely...
> >> On Apr 9, 2009, at 8:44 AM, Ricardo Ovaldia wrote:
> >>>
> >>> Dear all,
> >>>
> >>> Is there a way to adjust the -ranksum- test
> for covariates? Or is
> >>> there another way to do an adjusted
> Mann-Whitney U test? Something
> >>> similar to relationsip between ttest and
> regress.
> >>>
> >>> Thank you,
> >>> Ricardo.
> >>>
> >>> Ricardo Ovaldia, MS
> >>> Statistician
> >>> Oklahoma City, OK
> >
> >
> >
> > --
> >
> >
> > The documents accompanying this transmission may
> contain confidential
> > health or business information. This information is
> intended for the
> > use of the individual or entity named above. If you
> have received
> > this information in error, please notify the sender
> immediately and
> > arrange for the return or destruction of these
> documents.
> >
> > Constantine Daskalakis, ScD
> > Associate Professor,
> > Thomas Jefferson University, Division of Biostatistics
> > 1015 Chestnut St., Suite M100, Philadelphia, PA
> 19107
> > Tel: 215-955-5695
> > Fax: 215-503-3804
> > Email: [email protected]
> > Webpage:
> http://www.jefferson.edu/clinpharm/biostatistics/
> >
> > *
> > * 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/
>
> *
> * 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/
>
> *
> * 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/
*
* 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/
*
* 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/