## Not run:
# ### This will prompt the user to select an SPSS file
# scaleStructure();
# ## End(Not run)
### Load data from simulated dataset testRetestSimData (which
### satisfies essential tau-equivalence).
data(testRetestSimData);
### Select some items in the first measurement
exampleData <- testRetestSimData[2:6];
### Use all items
scaleStructure(dat=exampleData);
### Use a selection of two variables
scaleStructure(dat=exampleData, items=c('t0_item2', 't0_item4'));
### Make the items resemble an ordered categorical (ordinal) scale
ordinalExampleData <- data.frame(apply(exampleData, 2, cut,
breaks=5, ordered_result=TRUE,
labels=as.character(1:5)));
### Now we also get estimates assuming the ordinal measurement level
scaleStructure(ordinalExampleData);
Run the code above in your browser using DataLab