bootsempls: Bootstrap a PLS path model

Description Usage Arguments Details Value References See Also Examples

View source: R/bootsempls.R

Description

Bootstraps a PLS path model in a sempls object (as returned by the sempls method).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
bootsempls(object, nboot=200, start=c("ones", "old"), method=
            c("ConstructLevelChanges", "IndividualSignChanges",
            "Standard"), verbose=TRUE, strata, ...)

## S3 method for class 'bootsempls'
print(x, digits=3, ...)

## S3 method for class 'bootsempls'
summary(object, type=c("perc", "bca", "norm", "basic", "none"),
        level=0.95, ...)

## S3 method for class 'summary.bootsempls'
print(x, na.print, digits = 3, ...)

## S3 method for class 'bootsempls'
densityplot(x, data, pattern="beta", subset=NULL, ...)

## S3 method for class 'bootsempls'
parallelplot(x, data, pattern="beta", subset=NULL, reflinesAt,
         col=c("grey", "darkred", "darkred", "black"), lty=c("solid",
         "solid","dashed", "dotted"), ...)

Arguments

object

An object of class sempls as returned by the method sempls.

nboot

The number of bootstrap replications; the default is 200.

start

A character value defining the initialisation of outer weights. If

  • start="ones", then the outer weights for each block are initialised by ones.

  • start="old", the final outer weights taken from the sempls object are used for initialisation.

method

A character value, which can take the values:

  • "ConstructLevelChanges" (default): The vector of loadings for each LV in each resample is compared to the corresponding vector of loadings in the original sample. The signs of the weights, and consequently the signs of the loadings, are reversed if the absolute value of the sum differences between estimated loadings obtained from the original sample and the estimated loadings obtained from the resample is bigger than the absolute value of the sum sums of the latter, see Tenenhaus et al (2005).

  • "IndividualSignChanges": not implemented yet.

  • "Standard": No compensation for sign changes of resampled statistics.

verbose

A logical indicating, whether progress of bootstrap shall be displayed.

x

An object of class bootsempls and summary.bootsempls respectively.

na.print

A character substituting values not to be printed.

digits

Controls the number of digits to print.

type

Type of bootstrapped confidence intervals to compute; the default is "perc" (percentile); see boot.ci for details.

strata

An integer vector or factor specifying the strata for multi-sample problems. If the argument is not provided, all data is assumed to come from the same sample. For details, see boot.ci.

level

Level for confidence intervals; default is 0.95.

...

Arguments to be passed down to other methods.

data

The data is not used because the bootsempls object already contains the required data.

pattern

A regular expression passed on to grep. It is helpful to easily identify a set of coefficients, e.g. pattern="beta" plots the path coefficients only.

subset

Index or character vector of coefficients to include. Note, that subset overrides pattern.

reflinesAt

A vector of values at which to plot reference lines into the parallel cooordinates.

col

Colors for bootstrap statistics, sample statistic, lower and upper bootstrap confidence levels and reference lines.

lty

Line type for bootstrap statistics, sample statistic, lower and upper bootstrap confidence levels and reference lines.

Details

boot.sempls implements the nonparametric bootstrap, assuming an independent random sample. Convergence failures in the bootstrap resamples are discarded (and a warning printed); 10 consecutive convergence failures result in an error. You can use the boot function in the boot package for more complex sampling schemes and additional options.

Value

boot.sempls returns an object of class bootsempls, which inherits from class boot, supported by the boot package. The returned object contains the following components:

t0

The estimated parameters in the model fit to the original data set.

t

a matrix containing the bootstrapped estimates, one bootstrap replication per row.

data

The data frame containing the data to which the model was fit.

seed

The value of .Random.seed when boot.sempls was called.

statistic

The function used to produce the bootstrap replications; this is always the local function refit from boot.sempls.

sim

Always set to "ordinary"; see the documentation for the boot function.

stype

Always set to "i"; see the documentation for the boot function.

call

The call of the boot.sem function.

tryErrorIndices

Contains the indices for each resample, which returned try-error.

clcIndices

When the method ConstructLevelChanges is used, it stores the indices of the blocks of MVs for which a sign change occured.

bootIndices

A matrix containing the indices of the converged bootstrap samples as rows.

outer_weights

A martrix containing, as rows, the outer weights for each bootsrap sample.

fitted_model

The fitted sempls model returned from sempls.

strata

The strata used. This is the vector passed to boot, if it was supplied or a vector of ones if there were no strata.

References

Tenenhaus, M., V. E. Vinzi, Y.-M. Chatelin, and C. Lauro (2005) PLS path modeling. Computational Statistics & Data Analysis 48, 159-205.

See Also

boot, boot.sem

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
25
26
## Not run: 
data(ECSImobi)
ecsi <- sempls(model=ECSImobi, data=mobi)

### Bootstrapping
set.seed(123)
ecsiBoot <- bootsempls(ecsi, nboot=200, start="ones", verbose=TRUE)
summary(ecsiBoot, type="perc", level=0.95)



## inspectation of bootstrap samples
parallelplot(ecsiBoot, subset=1:ncol(ecsiBoot$t), reflinesAt=0)

# only inspecting the path coefficients
parallelplot(ecsiBoot, pattern="beta", reflinesAt=c(0,1))
densityplot(ecsiBoot, pattern="beta")

# only inspecting the outer loadings
parallelplot(ecsiBoot, pattern="lam")

# only inspecting the outer loadings for Loyalty
parallelplot(ecsiBoot, pattern="lam7", type="perc", level=0.90,
         main="Loyalty\n 200 bootstrapped outer loadings")

## End(Not run)

Example output

Loading required package: lattice
All 250 observations are valid.
Converged after 6 iterations.
Tolerance: 1e-07
Scheme: centroid
Loading required package: boot

Attaching package: 'boot'

The following object is masked from 'package:lattice':

    melanoma

Resample:   1  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 Done.
Call: bootsempls(object = ecsi, nboot = 200, start = "ones", verbose = TRUE)

Lower and upper limits are for the 95 percent perc confidence interval

         Estimate      Bias Std.Error    Lower Upper
lam_1_1    0.7434 -0.005673  4.53e-02  0.62329 0.810
lam_1_2    0.6007  0.000249  5.77e-02  0.46737 0.706
lam_1_3    0.5776 -0.002673  6.40e-02  0.42232 0.687
lam_1_4    0.7684  0.000789  4.25e-02  0.67230 0.837
lam_1_5    0.7445  0.005652  2.97e-02  0.68822 0.806
lam_2_1    0.7715 -0.003744  5.90e-02  0.59805 0.855
lam_2_2    0.6866 -0.000168  8.54e-02  0.48100 0.824
lam_2_3    0.6118 -0.004255  7.79e-02  0.42823 0.735
lam_3_1    0.8033  0.003649  2.36e-02  0.75426 0.853
lam_3_2    0.6374 -0.001334  5.44e-02  0.51036 0.736
lam_3_3    0.7835  0.000525  3.27e-02  0.69977 0.836
lam_3_4    0.7691 -0.006298  4.71e-02  0.66263 0.843
lam_3_5    0.7558 -0.001578  3.93e-02  0.66187 0.827
lam_3_6    0.7752 -0.004896  5.84e-02  0.63838 0.868
lam_3_7    0.7794  0.003265  2.96e-02  0.71380 0.834
lam_4_1    0.9043 -0.001000  2.32e-02  0.83570 0.938
lam_4_2    0.9379  0.001144  7.97e-03  0.92146 0.955
lam_5_1    0.7990  0.000196  3.32e-02  0.72011 0.856
lam_5_2    0.8462 -0.000636  2.27e-02  0.79791 0.884
lam_5_3    0.8519  0.000757  1.83e-02  0.81688 0.887
lam_6_1    1.0000  0.000000  6.72e-17        .     .
lam_7_1    0.8138 -0.000874  4.05e-02  0.71062 0.887
lam_7_2    0.2191  0.001964  9.88e-02  0.00811 0.444
lam_7_3    0.9168 -0.001365  1.21e-02  0.88882 0.938
beta_1_2   0.5047  0.009323  5.72e-02  0.38811 0.618
beta_2_3   0.5572  0.001871  5.71e-02  0.45412 0.670
beta_2_4   0.0508  0.016118  8.08e-02 -0.09488 0.257
beta_3_4   0.5572 -0.004915  7.73e-02  0.39421 0.705
beta_1_5   0.1788  0.007036  4.86e-02  0.09702 0.285
beta_2_5   0.0644 -0.009813  4.77e-02 -0.03830 0.153
beta_3_5   0.5125 -0.001069  6.52e-02  0.37933 0.634
beta_4_5   0.1918  0.003292  5.60e-02  0.07929 0.305
beta_5_6   0.5261  0.007725  5.03e-02  0.43577 0.626
beta_1_7   0.1954  0.005762  7.33e-02  0.04269 0.341
beta_5_7   0.4835 -0.003895  8.07e-02  0.30492 0.641
beta_6_7   0.0712  0.004157  5.57e-02 -0.01885 0.190

semPLS documentation built on May 2, 2019, 9:34 a.m.