Determines a confidence interval for a conditional mean in simple linear regression, using the percentile bootstrap method.

1 | ```
boot.cond.mean.per(x, y, xp, conf.level = 0.95, R = 9999)
``` |

`x` |
a (nonempty) numeric vector of predictor-variable data values. |

`y` |
the corresponding numeric vector of response-variable data values. |

`xp` |
the value of the predictor variable for which to find the CI for the conditional mean of the response variable. |

`conf.level` |
the confidence level (between 0 and 1); default is 0.95. |

`R` |
the number of bootstrap replications; default is 9999. |

A list with class "boot.regcor" containing the following components:

`Boot.values ` |
the point estimates (fits) obtained from the bootstrap. |

`Confidence.limits ` |
the upper and lower limits of the confidence interval. |

`Header ` |
the main title for the output. |

`Variable.1 ` |
the predictor variable. |

`Variable.2 ` |
the response variable. |

`n ` |
the sample size. |

`Statistic ` |
the name of the statistic, here fit. |

`Observed ` |
the observed point estimate (fit). |

`Replications ` |
the number of bootstrap replications. |

`Mean ` |
the mean of the bootstrap values. |

`SE ` |
the standard deviation of the bootstrap values. |

`Bias ` |
the difference between the mean of the bootstrap values and the observed value. |

`Percent.bias ` |
the percentage bias: 100*|Bias/Observed|. |

`Null ` |
always NULL for this function. |

`Alternative ` |
always NULL for this function. |

`P.value ` |
always NULL for this function. |

`p.value ` |
always NULL for this function. |

`Level ` |
the confidence level. |

`Type ` |
always NULL for this function. |

`Confidence.interval ` |
the confidence interval. |

`cor.ana ` |
a logical; always FALSE for this function. |

This routine should be used only when bias is small and the sampling distribution is roughly symmetric, as indicated by the output of the bootstrap. Otherwise, use the BCa version.

Neil A. Weiss

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
# Lot size, house size, and value for a sample of homes in a particular area.
data("homes")
str(homes)
attach(homes)
# 95% (default) CI for the conditional mean value of a 3000 sq.ft. home,
# with 999 bootstrap replications.
boot.cond.mean.per(HOUSE.SIZE, VALUE, 3000, R = 999)
# 90% CI for the conditional mean value of a 3000 sq.ft. home, with
# 999 bootstrap replications.
boot.cond.mean.per(HOUSE.SIZE, VALUE, 3000, conf.level = 0.90, R = 999)
detach(homes) # clean up
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.