Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

confint.RSA

Computes confidence intervals for RSA parameters, standard or bootstrapped


Description

Computes confidence intervals for RSA parameters, standard or bootstrapped (using a percentile bootstrap)

Usage

## S3 method for class 'RSA'
confint(
  object,
  parm,
  level = 0.95,
  ...,
  model = "full",
  digits = 3,
  method = "standard",
  R = 5000
)

Arguments

object

An RSA object

parm

Not used.

level

The confidence level required.

...

Additional parameters passed to the bootstrapLavaan function, e.g., parallel="multicore", ncpus=2.

model

A string specifying the model; defaults to "full"

digits

Number of digits the output is rounded to; if NA, digits are unconstrained

method

"standard" returns the CI for the lavaan object as it was computed. "boot" computes new percentile bootstrapped CIs.

R

If method = "boot", R specifies the number of bootstrap samples

Details

There are two ways of getting bootstrapped CIs and p-values in the RSA package If you use the option se="boot" in the RSA function, lavaan provides CIs and p-values based on the bootstrapped standard error (not percentile bootstraps). If you use confint(..., method="boot"), in contrast, you get CIs and p-values based on percentile bootstrap.

See Also

Examples

## Not run: 
set.seed(0xBEEF)
n <- 300
err <- 2
x <- rnorm(n, 0, 5)
y <- rnorm(n, 0, 5)
df <- data.frame(x, y)
df <- within(df, {
	diff <- x-y
	absdiff <- abs(x-y)
	SD <- (x-y)^2
	z.sq <- SD + rnorm(n, 0, err)
})

r1 <- RSA(z.sq~x*y, df, models="SSQD")
(c1 <- confint(r1, model="SSQD"))

# Dummy example with 10 bootstrap replications - better use >= 5000!
(c2 <- confint(r1, model="SSQD", method="boot", R=10))
# multicore version
confint(r1, model="SSQD", R=5000, parallel="multicore", ncpus=2)

## End(Not run)

RSA

Response Surface Analysis

v0.10.4
GPL (>= 2)
Authors
Felix Schönbrodt [cre, aut], Sarah Humberg [aut]
Initial release
2021-03-23

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.