predict: Predict semiparametric conditional probability

Description Usage Arguments Value

Description

This calculates pointwise semiparametric conditional probability Pr(y=1|x) based on the fitted semiparametric binary response model. If new data are not given, it returns in-sample conditional probabilities using fitted.semiBRM.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'semiBRM'
predict(
  object,
  newdata = NULL,
  boot.se = FALSE,
  ci.level = 0.95,
  nboot = 300L,
  h = NULL,
  ...
)

Arguments

object

a fitted 'semiBRM' object.

newdata

a data.frame or matrix at which conditional probabilities are computed.

boot.se

a logical indicating whether to report standard errors and confidence intervals. If boot.se = TRUE, it calculates standard errors pointwise from semiparametric bootstrapping.

ci.level

a numeric representing bootstrap confidence intervals. This is useful only when boot.se = TRUE.

nboot

an integer indicating the number of bootstrap replications. This is useful only when boot.se = TRUE.

h

a numeric of bandwidth size in the Nadaraya-Watson estimator. If not given, it will use the Silverman's rule of thumb bandwidth, h = sd(x)*1.06*N^(-1/5).

...

further arguments (currently ignored).

Value

If boot.se = FALSE, then it will return a list with the following components:

prob predictions.
non.endpoint taking TRUE if estimated probabilities are evaluated at points away from boundaries and FALSE otherwise.

If boot.se = TRUE, then it will return a list with the following components:

prob predictions.
boot.se semiparametric bootstrap standard errors.
boot.ci semiparametric bootstrap confidence intervals.
non.endpoint taking TRUE if estimated probabilities are evaluated at points away from boundaries and FALSE otherwise.

henrykye/semiBRM documentation built on Dec. 20, 2021, 3:49 p.m.