R: The Kristr"om's nonparametric approach to analyze...
kristrom
R Documentation
The Kristr"om's nonparametric approach to analyze single-bounded dichotomous choice contingent valuation data
Description
This function analyzes single-bounded dichotomous choice contingent valuation (CV) data on the basis
of the Kristr"om's nonparametric method.
Usage
kristrom(formula, data, subset)
## S3 method for class 'kristrom'
print(x, digits = 4, ...)
Arguments
formula
a formula specifying the model structure.
data
a data frame containing the variables in the model formula.
subset
an optional vector specifying a subset of observations.
x
an object of class "kristrom".
digits
a number of digits to display.
...
optional arguments. Currently not in use.
Details
The function kristrom() analyzes single-bounded dichotomous choice contingent
valuation (CV) data on the basis of Kristr"om's nonparametric method (Kristr"om 1990).
The argument formula defines the response variables and bid variables.
The argument data is set as a data frame containing the variables in the model.
A typical structure of the formula for kristrom() is defined as follows:
R1 ~ BD1
The formula consists of two parts. The first part, the left-hand side of the tilde sign
(~), must contain the response variable (e.g., R1) for the suggested prices
in the CV questions. The response variable contains "Yes" or "No" to the bid
or 1 for "Yes" and 0 for "No". The other part, which starts
after the tilde sign, must contain a bid variable (e.g., BD1) containing suggested
prices in the CV question.
The structure of data set which assigned to the argument data is the same as that in case
of dbchoice(). See dbchoice for details in the data set structure.
Value
The function kristrom() returns an object of S3 class "kristrom".
An object of "kristrom" is a list with the following components.
tab.dat
a matrix describing the number of respondents who answered "yes" to CV question,
total number of respondents, and ratio of respondents who answered "yes" among the total number of
respondents for each value of the suggested bids.
M
the number of rows of tab.dat.
adj.p
a vector describing the probability of a yes-answer to the suggested bid, which is the same
as the last column of tab.dat.
nobs
the number of observations.
unq.bid
a vector of the unique bids.
estimates
a matrix of the estimated Kristr"om's survival probabilities.
The generic function print() is available for fitted model object of class "kristrom"
and displays the estimated Kristr"om's survival probabilities.
The extractor function summary() is used to display the estimated Kristr"om's survival
probabilities as well as three types of WTP estimates (Kaplan-Meier and Spearman-Karber mean, and median estimates). Note that the Spearman-Karber mean estimate is computed
upto the X-intercept.
A graph of the estimated empirical survival function is depicted by plot().
See plot.kristrom for details.
turnbull.sb is an alternative nonparametric method for analyzing single-bounded
dichotomous choice data. A parametric analysis can be done by sbchoice.
Kristr"om B (1990).
“A Non-Parametric Approach to the Estimation of Welfare
Measures in Discrete Response Valuation Studies.”
Land Economics, 66(2), 135–139.
See Also
plot.kristrom, NaturalPark,
turnbull.sb, sbchoice
Examples
## 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)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DCchoice)
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
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DCchoice/kristrom.Rd_%03d_medium.png", width=480, height=480)
> ### Name: kristrom
> ### Title: The Kristr"om's nonparametric approach to analyze
> ### single-bounded dichotomous choice contingent valuation data
> ### Aliases: kristrom print.kristrom
> ### Keywords: DCchoice single-bounded nonparametric survival
>
> ### ** Examples
>
> ## 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
Probability:
Upper Prob.
1 0 1.0000
2 6 0.6579
3 12 0.5584
4 24 0.5122
5 48 0.4675
6 Inf 0.0000
> NPkss <- summary(NPks)
> NPkss
Survival probability:
Upper Prob.
1 0 1.0000
2 6 0.6579
3 12 0.5584
4 24 0.5122
5 48 0.4675
6 Inf 0.0000
WTP estimates:
Mean: 24.665138 (Kaplan-Meier)
Mean: 85.533280 (Spearman-Karber)
Median: 30.553191
> plot(NPks)
>
>
>
>
>
> dev.off()
null device
1
>