s-news
[Top] [All Lists]

Re: Bootstrap help

To: "Hillary Robison" <hrobison@unr.nevada.edu>
Subject: Re: Bootstrap help
From: "Samer Mouksassi" <smouksassi@Pharsight.com>
Date: Tue, 20 Jan 2009 18:40:07 -0800
Cc: <s-news@lists.biostat.wustl.edu>
In-reply-to: <1232504085.49768515438dd@secure.unr.nevada.edu>
Thread-index: Acl7bj/UhbMzwiWzSOCME0sRSMBaagAArqeg
Thread-topic: [S] Bootstrap help
Dear Hillary,

You may want to look at the design and hmisc libraries including lrm and
other validation functions.

These provide an array of possibilities including validating your
predictive performance e.g: ROC or Dxy performing your backward
elimination for each bootstrap fit etc....

Hope this helps,

Samer
-----Original Message-----
From: s-news-owner@lists.biostat.wustl.edu
[mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of Hillary
Robison
Sent: Tuesday, January 20, 2009 9:15 PM
To: s-news@lists.biostat.wustl.edu
Subject: [S] Bootstrap help

Hello kind souls,

I am using S-plus 6.2.  I am new to the "bootstrap" function in S-plus.
I have
looked at S-plus Help and this list-serve for previous questions similar
to
mine and I am still stuck.

I performed a logistic regression using the GUI.  In the "Predict" tab,
I
selected "Prediction Type" "response."  The data frame was: P100.A300.
The
best model was "model3":

P ~ X1 + X2 + X3 + X4 + as.factor(X5)

I got a column of predicted response values (probabilities ranging from
0 to 1).
 Now I want to resample (via bootstrap) the predicted response and use
it to
test/validate my model.

I tried using the "Statistics -> "Resample" -> "Bootstrap" option.  My
question
is, what do I type into the "Expression" box to do this?

S-plus Help says, "For example, to bootstrap or jackknife the regression
coefficients for regressing Mileage on Weight in the fuel.frame data,
use the
expression coef(lm(Mileage~Weight, fuel.frame)) and specify fuel.frame
as the
Data Set."

So, trying to follow this logic, I typed in the "Expression" box:

response(model3(P ~ X1 + X2 + X3 + X4 + as.factor(X5)), P100.A300))

I get the error:

"11: eval(action, sys.parent())
10: doErrorAction("Problem in eval(statistic, c(list(P100.A300..:
Couldn't find
a function definition for \"model3\"",
9: response(model3(P ~ X1 + X2 + X3 +
8: eval(statistic, c(list(P100.A300 = data), data))
7: eval(statistic, c(list(P100.A300 = data), data))
6: fit.func(1:n, data, statistic, args.stat)
5: bootstrap(data = P100.A300, statistic = response(model3(
4: eval(fun.call)
3: menuBootstrap(data = P100.A300, statistic = response(
2: eval(expression(menuBootstrap(data = P100.A300, statistic =
1: Message: Problem in eval(statistic, c(list(P100.A300..: Couldn't find
a
function definition for "model3""

What should I type in the "Expression" box to resample (via bootstrap)
the
column of predicted response values (probabilities ranging from 0 to 1)
from my
model so I can test/validate it?

Thank you so much for your help.
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • Bootstrap help, Hillary Robison
    • Re: Bootstrap help, Samer Mouksassi <=