print.bootstrap_r_squared_change: Print output for bootstrap_r_squared_change object

Description Usage Arguments Examples

View source: R/bootstrap_r_squared_change.R

Description

Print output including descriptive statistics and bootstrap results.

Usage

1
2
## S3 method for class 'bootstrap_r_squared_change'
print(x, digits = 3, ...)

Arguments

x

object of class bootstrap_r_squared_change

digits

positive intenger: number of decimal points to display. Numbers are passed to round(x, digits)

...

further arguments passed to or from other methods (not currently used)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Load data and meta data:
data(facets_data); data(facets_meta)

## Using 50 iterations is too few, but is used here to
## make the example run quickly.

##  Save object
fit <- bootstrap_r_squared_change(facets_data,
             facets_meta$swb[1],
             facets_meta$ipip_factors,
             facets_meta$ipip_facets,
             iterations=50)
## print object
print(fit)

## Alternatively, the object fit object can be explored directly:

## Show density plot of bootstrapped estimates of rho-squared change.
plot(density(fit$theta_hats),
     xlab="rho-squared change",
     main="Density of bootstrap estimates")

## Extract the confidence interval values
fit$ci_values

jeromyanglim/personalityfacets documentation built on Dec. 23, 2019, 7:31 p.m.