Description Usage Arguments Value See Also Examples
The pbg
function implements three hypothesis tests. These tests are whether the profiles are parallel, have equal levels, and are flat across groups defined by the grouping variable. If parallelism is rejected, the other two tests are not necessary. In that case, flatness may be assessed within each group, and various within- and between-group contrasts may be analyzed.
1 |
data |
A matrix or data frame with multiple scores; rows represent individuals, columns represent subscores. Missing subscores have to be inserted as NA. |
group |
A vector or data frame that indicates a grouping variable. It can be either numeric or character (e.g., male-female, A-B-C, 0-1-2). The grouping variable must have the same length of x. Missing values are not allowed in y. |
original.names |
Use original column names in x. If FALSE, variables are renamed using v1, v2, ..., vn for subscores and "group" for the grouping variable. Default is FALSE. |
profile.plot |
Print a profile plot of scores for the groups. Default is FALSE. |
An object of class profg
is returned, listing the following components:
data.summary
- Means of observed variables by the grouping variable
corr.table
- A matrix of correlations among observed variables splitted by the grouping variable
profile.test
- Results of F-tests for testing parallel, coincidential, and level profiles across two groups.
1 2 3 4 5 6 7 |
Loading required package: ggplot2
Loading required package: RColorBrewer
Loading required package: reshape
Loading required package: lavaan
This is lavaan 0.5-23.1097
lavaan is BETA software! Please report any bugs.
Data Summary:
Husband Wife
item1 3.900000 3.833333
item2 3.966667 4.100000
item3 4.333333 4.633333
item4 4.400000 4.533333
Call:
pbg(data = spouse[, 1:4], group = spouse[, 5], original.names = TRUE,
profile.plot = TRUE)
Hypothesis Tests:
$`Ho: Profiles are parallel`
Multivariate.Test Statistic Approx.F num.df den.df p.value
1 Wilks 0.8785726 2.579917 3 56 0.06255945
2 Pillai 0.1214274 2.579917 3 56 0.06255945
3 Hotelling-Lawley 0.1382099 2.579917 3 56 0.06255945
4 Roy 0.1382099 2.579917 3 56 0.06255945
$`Ho: Profiles have equal levels`
Df Sum Sq Mean Sq F value Pr(>F)
group 1 0.234 0.2344 1.533 0.221
Residuals 58 8.869 0.1529
$`Ho: Profiles are flat`
F df1 df2 p-value
1 24.82071 3 57 0.0001554491
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.