| linsa {sensitivity} | R Documentation |
linsa computes the standardized regression coefficients (SRC)
and the partial correlation coefficients (PCC). Analysis can be done
on the ranks; then the indices are the standardized rank regression
coefficients (SRRC) and the partial rank correlation coefficients
(PRCC).
linsa(model = NULL, x, pcc = TRUE, rank = FALSE,
nboot = 0, conf = 0.95, ...)
## S3 method for class 'linsa':
compute(sa, y = NULL)
model |
the model. |
x |
the input sample. |
pcc |
logical. If TRUE, the P(R)CCs are computed. |
rank |
logical. If TRUE, the analysis is done on the
ranks. |
nboot |
the number of bootstrap replicates. |
conf |
the confidence level for bootstrap confidence intervals. |
sa |
the sensitivity analysis object. |
y |
the response. |
... |
any other arguments for model which are passed
unchanged each time it is called. |
model is a function or a predictor (a class with a
predict method) computing the response y based on the
sample given by x. If no model is specified, the indices will be
computed when one gives the response.
linsa returns an object of class "linsa".
An object of class "linsa" is a list containing the following
components:
model |
the model. |
x |
the input sample. |
rank |
logical. If TRUE, the analysis was done on the
ranks. |
nboot |
the number of bootstrap replicates. |
conf |
the confidence level for bootstrap confidence intervals. |
y |
the response. |
src |
the estimations of the SRC indices (or SRRC if rank analysis is requested). |
pcc |
if requested, the estimations of the PCC indices (or PRCC if rank analysis is requested). |
call |
the matched call. |
Saltelli, A., Chan, K. and Scott, E. M., 2000, Sensitivity analysis, Wiley.
# linear model : Y = X1 + X2 + X3
model1 <- function(x) x[, 1] + x[, 2] + x[, 3]
# a 500-sample with X1 ~ U(0.5, 1.5)
# X2 ~ U(1.5, 4.5)
# X3 ~ U(4.5, 13.5)
n <- 500
x <- data.frame(X1 = runif(n, 0.5, 1.5),
X2 = runif(n, 1.5, 4.5),
X3 = runif(n, 4.5, 13.5))
# sensitivity analysis
sa <- linsa(model = model1, x = x, nboot = 100)
print(sa)
par(mfrow = c(1,2))
plot(sa, ask = FALSE)