s-news
[Top] [All Lists]

Bootstrap help

To: s-news@lists.biostat.wustl.edu
Subject: Bootstrap help
From: Hillary Robison <hrobison@unr.nevada.edu>
Date: Tue, 20 Jan 2009 18:14:45 -0800
User-agent: Internet Messaging Program (IMP) 3.2.8
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.

<Prev in Thread] Current Thread [Next in Thread>