View source: R/extensionScripts.R
sampleMarginalFit | R Documentation |
As part of the Extension Method, this function will generate a random sample from the marginal distribution of the target variable, using a sample from the marginal distribution of the extension variable, the specified c-distribution, and the appropriate judgements used to construct the median model.
sampleMarginalFit(
fitX,
sampleY,
medianY,
yCP,
xMed,
dist = "best",
link = "identity"
)
fitX |
an object of class |
sampleY |
a sample from the marginal distribution of the extension variable. |
medianY |
the median value of the extension variable. |
yCP |
vector of conditioning points for the extension variable. |
xMed |
vector of medians of the target variable, corresponding to
each value of the extension variable in |
dist |
choice of parametric distribution for the c-distribution. Options are
|
link |
link in the median function. One of |
a vector containing a sample from the marginal distribution of the target variable.
## Not run:
myfitX <- fitdist(vals = c(5.5, 9, 14),
probs = c(0.25, 0.5, 0.75),
lower = 0)
ry <- rgamma(10, 5.19, 0.694)
sampleMarginalFit(fitX = myfitX,
sampleY = ry,
medianY = 7,
yCP = c(3, 5, 7, 9.5, 13.5),
xMed = c(2, 6.5, 9, 13, 20),
dist = "lognormal",
link = "log")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.