Learn R Programming

blox (version 0.0.1)

hc.beta: Compute Revelle's Beta for all worst split-halves using HC-SVD.

Description

Performs HC-SVD to reveal the hierarchical variable structure using average linkage as described in Bauer (202Xa). For a data matrix comprising \(p\) items, this means that \(p-1\) splits are identified. The obtained structure aligns with the structure according to the worst split-half reliability and is thus used to compute a hierarchy of all Revelle's beta as described in Bauer (202Xb).

Usage

hc.beta(R, splits = NULL, n.splits = NULL, is.corr = TRUE, verbose = TRUE)

Value

A list with n.splits components. Each split is a list of four components:

split

The split number.

beta

Revelle's beta for this split.

A

One of the two sub-scales that has been split.

B

One of the two sub-scales that has been split.

beta.alpha

Computes the ratio of Revelle's beta and Cronbach's alpha.

Arguments

R

A correlation matrix of dimension \(p\)x\(p\) or a data matrix of dimension \(n\)x\(p\) can be provided. If a data matrix is supplied, it must be indicated by setting is.corr = FALSE, and the correlation matrix will then be calculated as cor(X).

splits

An object containing the splits identified by HC-SVD. This can either be the result of hcsvd (for all splits) or bd.approx (for a single split). If omitted, hc.beta will internally call hcsvd(R) and compute Revelle's beta for all \(p - 1\) splits.

n.splits

Number of splits for which Revelle's beta is computed. If splits is from hcsvd, the default is all \(p-1\) splits. If splits is from bd.approx, only a single split is available and n.splits is set to 1.

is.corr

Is the supplied object a correlation matrix. Default is TRUE and this parameter must be set to FALSE if a data matrix instead of a correlation matrix is supplied.

verbose

Print out progress as \(p-1\) iterations for divisive hierarchical clustering are performed. Default is TRUE.

Details

Supplementary details are in Bauer (202Xb).

References

Bauer, J.O. (202Xa). Divisive hierarchical clustering using block diagonal matrix approximations. Working paper.

Bauer, J.O. (202Xb). Revelle's beta: The wait is over - we can compute it!. Working paper.

See Also

bd.approx hcsvd

Examples

Run this code
#We compute the worst split-half reliabilities on a correlation matrix.

# \donttest{
#Load the correlation matrix Bechtoldt from the psych
#package (see ?Bechtoldt for more information).
if (requireNamespace("psych", quietly = TRUE)) {
  data("Bechtoldt", package = "psych")
}
R <- Bechtoldt


### RUN HC-SVD FOR HIERARCHICAL VARIABLE CLUSTERING

#Compute HC-SVD (with average linkage).
hcsvd.obj <- hcsvd(R)

#The object of type hclust with corresponding dendrogram can be obtained
#directly from hcsvd(...):
hc.div <- hcsvd.obj$hclust
plot(hc.div, axes = FALSE, ylab = "", main = "Revelle's Beta Splits")


### COMPUTE REVELLE'S BETA FOR ALL IDENTIFIED SPLITS

#Compute Revelle's beta
betas <- hc.beta(R = R)

#Alternatively, you can submit the object obtained from hcsvd(). Thus,
#the hiearchy needs not to be computed again using hcsvd().
betas <- hc.beta(R = R, splits = hcsvd.obj)

#Visualize the splits, e.g., as
splits <- sapply(betas, `[[`, "split")
beta.values <- sapply(betas, `[[`, "beta")

plot(splits, beta.values,
  type = "b",
  xlab = "Split",
  ylab = "Revelle's Beta",
  main = "Revelle's Beta Across Splits",
  pch = 19)

#Visualize the ratio of Revelle's beta and Cronbach's alpha
beta.alpha <- sapply(betas, `[[`, "beta.alpha")
plot(splits, beta.values,
  type = "b",
  xlab = "Split",
  ylab = "Beta/Alpha",
  main = "Ratio of Beta and Alpha Across Splits",
  pch = 19)


### COMPUTE REVELLE'S BETA FOR THE FIRST IDENTIFIED SPLIT

#The first split can be identified using bd.approx()
#This is computationally faster, as only the first split
#is identified
hc.beta(R = R, splits = bd.approx(R))

# }


Run the code above in your browser using DataLab