## Examples for kristrom() are also based on a data set NaturalPark in the package
## Ecdat (Croissant 2011): so see the section Examples in the dbchoice() for details.
data(NaturalPark, package = "Ecdat")
## The variable answers are converted into a format that is suitable for the function
## kristrom() as follows:
NaturalPark$R1 <- ifelse(substr(NaturalPark$answers, 1, 1) == "y", 1, 0)
## The formula is defined as follows:
fmks <- R1 ~ bid1
## The function kristrom() with the function fmks and the data frame NP
## is executed as follows:
NPks <- kristrom(fmks, data = NaturalPark)
NPks
NPkss <- summary(NPks)
NPkss
plot(NPks)
Run the code above in your browser using DataLab