Description Usage Arguments Details Value Author(s) See Also Examples

This function returns predictions for an object of class “`ctqr`

”.

1 2 |

`object` |
a |

`newdata` |
optional data frame in which to look for variables with which to predict. It must include all the covariates that enter the quantile regression model. If omitted, the fitted values are used. |

`se.fit` |
logical. If |

`...` |
for future methods. |

This function produces predicted values obtained by evaluating the regression function at `newdata`

(which defaults to `model.frame(object)`).

If `se = FALSE`, a matrix of fitted values, with rows corresponding to different observations, and one column for each value of `object$p`. If `se = TRUE`, a list with two items:

`fit` |
a matrix of fitted values, as described above. |

`se.fit` |
a matrix of estimated standard errors. |

Paolo Frumento

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
# Using simulated data
n <- 1000
x1 <- runif(n)
x2 <- runif(n)
t <- 1 + x1 + x2 + runif(n, -1,1)
c <- rnorm(n,3,1)
y <- pmin(t,c)
d <- (t <= c)
model <- ctqr(Surv(y,d) ~ x1 + x2, p = c(0.25,0.5))
pred <- predict(model) # the same as fitted(model)
predict(model, newdata = data.frame(x1 = c(0.2,0.6), x2 = c(0.1,0.9)), se.fit = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.