Description Usage Arguments Details Value See Also Examples

View source: R/predict.dbchoice.R

Predicting method for objects of class "dbchoice".

1 2 3 |

`object` |
an object of class "dbchoice". |

`newdata` |
a data frame containing new data to predict. If |

`type` |
type of prediction (utility or probability). |

`bid` |
a bid design needed to predict with original data. |

`...` |
optional arguments. Currently not in use. |

The function `predict()`

for S3 object "dbchoice" calculates predicted values
according to the fitted model that is included in `object`

. The values are
predicted with the original data used for fitting the model if `newdata = NULL`

,
otherwise with a new data assigned to `newdata`

. There are two notes for
`dbchoice()`

: a bid design used for the fit must be assigned to `bid`

,
when predicting with the original data; the predicted values are calculated according
to the relevant single-bounded dichotomous choice model, when predicting with a new
data. See examples for details.

The current function does not estimate standard errors of predicted values.

When `newdata = NULL`

and `type = utility`

, a matrix containing utility
values under first (`f`

), second upper (`u`

), and second lower (`l`

) bids
is returned. When `newdata = NULL`

and `type = probability`

, a matrix
containing probabilities of choosing Yes-Yes (`yy`

), No-No (`nn`

), Yes-No (`yn`

),
and No-Yes (`ny`

) is returned. When a new data is assigned to `newdata`

,
predictions are calculated according to the relevant single-bounded dichotomous choice
model, and a vector containing utility values of choosing yes (`type = utility`

)
or probability of choosing yes (`type = probability`

) is returned.

1 | ```
## See Examples in dbchoice.
``` |

```
Loading required package: MASS
Loading required package: interval
Loading required package: survival
Loading required package: perm
Loading required package: Icens
Loading required package: MLEcens
Loading required package: Formula
```

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.