turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Bootstrap for assessing regression coefficient in ...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-18-2017 10:22 AM

Dear Braintrust,

I am analyzing data to predict an outcome in 600 calves (lung lesions 0/1) based on clinical signs observed in calves.

I used Proc logistic to obtain the regression coefficient. I want to make some prediction rules based on these coefficients.

however, I want to take into account overoptimistic weights and I therefore want to have robust estimates of these regressions coefficients.

I want to know if there is any macro to be able to obtain distribution of these regression coefficients based on bootstrapped samples.

Many thanks!

basic code I used:

**proc** **logistic **data=final;

class x1 x2 x3 x4;

model lesion = x1 x2 x3 x4;

**run**;

Accepted Solutions

Solution

05-18-2017
11:16 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-18-2017 11:08 AM - edited 05-18-2017 11:11 AM

For a general overview of how to bootstrap in SAS, see "Compute a bootstrap confidence interval in SAS"

To resample from the data to form the bootstrap samples:

1) Use PROC SURVEYSELECT to draw B samples with replacement from your data. You will obtain one SAS data set that has a REPLICATE variable that identifies the B samples:

```
proc surveyselect data=final NOPRINT seed=12345
out=SAMPLES
method=urs /* resample with replacement */
samprate=1 /* each bootstrap sample has N observations */
OUTHITS
reps=10; /* generate this many bootstrap resamples */
run;
```

2) Use a BY REPLICATE statement in your PROC LOGISTIC code:

```
proc logistic data=SAMPLES;
by REPLICATE;
class x1 x2 x3 x4;
model lesion = x1 x2 x3 x4;
run;
```

3. To analyze the bootstrap estimates, follow the ideas in "Simulate many samples from a logistic regression model."

All Replies

Solution

05-18-2017
11:16 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-18-2017 11:08 AM - edited 05-18-2017 11:11 AM

For a general overview of how to bootstrap in SAS, see "Compute a bootstrap confidence interval in SAS"

To resample from the data to form the bootstrap samples:

1) Use PROC SURVEYSELECT to draw B samples with replacement from your data. You will obtain one SAS data set that has a REPLICATE variable that identifies the B samples:

```
proc surveyselect data=final NOPRINT seed=12345
out=SAMPLES
method=urs /* resample with replacement */
samprate=1 /* each bootstrap sample has N observations */
OUTHITS
reps=10; /* generate this many bootstrap resamples */
run;
```

2) Use a BY REPLICATE statement in your PROC LOGISTIC code:

```
proc logistic data=SAMPLES;
by REPLICATE;
class x1 x2 x3 x4;
model lesion = x1 x2 x3 x4;
run;
```

3. To analyze the bootstrap estimates, follow the ideas in "Simulate many samples from a logistic regression model."