Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • RE-Row-wise two sample T-test on subsets of a matrix

    0 answers - 3652 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    whoops. forgot to mention the apply command.
    so this is what I exactly typed in
    fun5<-function(m){as.numeric(t.test(m[1:11],m[12:22])[[1]])}
    abc<-apply(temp.matrix,1,fun5)
    temp.matrix or course being my 196002*22 matrix
    and then I got the t-test rowwise for my two groups.
    It's just that previously I had the extra commas in my
    function. Post doc in lab helped me. Syntax always worries me.
    nameeta
    message
    >Date: Fri, 2 Mar 2007 11:28:26 -0500
    >From: "Leeds, Mark (IED)" <Mark.Leeds (AT) morganstanley (DOT) com
    >Subject: RE: [R] RE-Row-wise two sample T-test on subsets of

    a matrix
    >To: "Nameeta Lobo" <nlobo (AT) uchicago (DOT) edu>
    >
    >wow, so it didn't even need a call to apply. t.test must be

    vectorized.
    >interesting.
    >

    --
    Message
    >From: r-help-bounces (AT) stat (DOT) math.ethz.ch
    >[mailto:r-help-bounces (AT) stat (DOT) math.ethz.ch] Behalf

    Nameeta Lobo
    >Sent: Friday, March 02, 2007 11:09 AM
    >To: r-help (AT) stat (DOT) math.ethz.ch
    >Subject: [R] RE-Row-wise two sample T-test on subsets of a matrix
    >
    >hello all
    >
    >thanks a lot for the info, I just actually needed to remove

    that comma
    >in my command line
    >
    >what i had typed in was
    >t.test(temp.matrix[,1:11],temp.matrix[,12:22],paired=TRUE)
    >what i needed to do was
    >t.test(temp.matrix[1:11],temp.matrix[12:22],paired=TRUE)
    >
    >thanks Petr, saw your comment later.
    >
    >nameeta
    >
    >
    >R-help (AT) stat (DOT) math.ethz.ch mailing list
    >
    >PLEASE do read the posting guide
    >
    >and provide commented, minimal, self-contained, reproducible

    code.
    >
    >
    >This is not an offer (or solicitation of an offer) to

    buy/sell the securities/instruments mentioned or an official
    confirmation. Morgan Stanley may deal as principal in or own
    or act as market maker for securities/instruments mentioned or
    may advise the issuers. This is not research and is not from
    MS Research but it may refer to a research analyst/research
    report. Unless indicated, these views are the author's and
    may differ from those of Morgan Stanley research or others in
    the Firm. We do not represent this is accurate or complete
    and we may not update this. Past performance is not
    indicative of future returns. For additional information,
    research reports and important disclosures, contact me or see
    You should not use e-mail
    to request, authorize or effect the purchase or sale of any
    security or instrument, to send transfer instructions, or to
    effect any other transactions. We cannot guarantee that any
    such requests received via e-mail will be processed in a
    timely manner. This communication is solely for the
    addressee(s) and may contain confidential information. We do
    not waive confidentiality by mistransmission. Contact me if
    you do not wish to receive these communications. In the UK,
    this communication is directed in the UK to those persons who
    are market counterparties or intermediate customers (as
    defined in the UK Financial Services Authority's rules).
    R-help (AT) stat (DOT) math.ethz.ch mailing list
    PLEASE do read the posting guide
    and provide commented, minimal, self-contained, reproducible code.

Re: RE-Row-wise two sample T-test on subsets of a matrix


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Development"

EMSDN.COM