Computed theoretical power for N=100 and N=200 scenarios

This commit is contained in:
2024-02-19 18:35:26 +01:00
parent ac9189d26a
commit 238852b08b
704 changed files with 261610 additions and 187 deletions

View File

@ -0,0 +1,365 @@
capture program drop valid
program valid
syntax varlist, PARTition(numlist integer >0) [SCOrename(string) IMPute NORound CALCmethod(string) DESCitems GRAPHs cfa CFAMethod(string) CFAStand CONVdiv TCONVdiv(real 0.4) CONVDIVBoxplots Alpha(real 0.7) Delta(real 0.9) h(real 0.3) HJmin(real 0.3) REPet(varlist) KAPpa ICKAPpa(integer 0) kgv(varlist) KGVBoxplots KGVGroupboxplots conc(varlist) tconc(real 0.4)]
preserve
qui set autotabgraphs on
qui set more off
local C = 0
foreach z in `partition' {
local C = `C' + `z'
}
local nbvars : word count `varlist'
/*
if `C' > `nbvars' {
di in red "The sum of the numbers in the partition option is greater than the number of variables in the dataset"
exit 119
}
*/
local nbvars : word count `varlist'
if `C' != `nbvars' {
di in red "The sum of the numbers in the partition option is different from the number of variables precised in varlist"
exit 119
}
local P:word count `partition'
if "`scorename'" !="" {
local S:word count `scorename'
if `P'!=`S' {
di in red "The number of score names given is different from the number of dimensions in the partition option"
exit 119
}
foreach sco in `scorename' {
capture confirm variable `sco'
if !_rc {
di in red "`sco' is a variable of the dataset. Choose another name"
exit 119
}
tokenize `scorename'
local g = 0
forvalues i = 1/`S' {
if "`sco'" == "``i''" {
local `++g'
}
}
if `g' > 1 {
di in red "2 or more dimensions have the same name"
exit 119
}
}
}
else {
local name
local nname
forvalues i = 1/`P' {
local name "Dim`i'"
local nname `nname' `name'
}
local scorename = "`nname'"
}
/*
if "`ident'" == "" {
tempvar id
qui gen `id' = _n
}
else {
qui tab `ident', nofreq
local u = r(r)
if `u' != _N {
di in red "`ident' has not unique values"
exit 119
}
}
*/
/*
if "`repitems'" !="" {
local a : word count `repitems'
if mod(`a',2) != 0 {
di in red "error repitems: odd number"
exit
}
foreach r in `repitems' {
capture confirm variable `r'
if _rc!=0 {
di in red "`r' does not exist"
exit 119
}
}
}
*/
/*
local y = 0
if "`repscores'" !="" {
local a : word count `repscores'
if mod(`a',2) != 0 {
di in red "error repscores : odd number"
exit 119
}
foreach r in `repscores' {
local x = 0
local y = 0
capture confirm variable `r'
if _rc!=0 local x = 1
foreach s in `scorename' {
if "`r'" == "`s'" local y = `y'+1
}
if `x' == 1 & `y' < 1 {
di "`r' " "non d<>fini"
exit 119
}
}
}
*/
if "`kgv'" !="" {
foreach k in `kgv' {
capture confirm variable `k'
if _rc!=0 {
di in red "`k' does not exist"
exit 119
}
}
}
if "`conc'" !="" {
foreach c in `conc' {
capture confirm variable `c'
if _rc!=0 {
di in red "`c' does not exist"
exit 119
}
}
}
/*
if `t2from' > _N {
di in red "Reproductibility : invalid range for observations at time 2 (`t2from' > number of observations)"
exit 119
}
if `t2to' > _N {
di in red "Reproductibility : invalid range for observations at time 2 (`t2to' > number of observations)"
exit 119
}
if "`t2from'" != "" & "`t2to'" != "" {
if `t2from' > `t2to' {
di in red "Reproductibility : invalid range for observations at time 2"
exit 119
}
}
if "`t2from'" == "" local t2from = 1
if "`t2to'" == "" local t2to = _N
*/
local i = 1
foreach x in `varlist' {
local var`i' = "`x'"
local `++i'
}
di as result "Items used for calculation of the scores"
di
local i = 1
local j = 1
local y = 1
foreach p in `partition' {
tokenize `scorename'
di "{bf:``i''} : " _c
if `j' == 1 local s = `p'
else local s = `s' +`p'
forvalues z = `y'/`s' {
di "{text:`var`z'' }" _c
}
local `i++'
local `j++'
local y = `s'+1
di
}
qui destring _all, replace
di
/*
local cpt = 0
if "`sum'" != "" {
local cpt `cpt' + 1
}
if "`mean'" != "" {
local cpt `cpt' + 1
}
if "`stand'" != "" {
local cpt `cpt' + 1
}
if `cpt'>1 {
di in red "You must choose between mean, sum or stand (the options are exclusive)"
exit 119
}
*/
calcscore `varlist', scorename(`scorename') partition(`partition') calcmethod(`calcmethod')
if "`descitems'" != "" {
di as result "{hline}"
di "Description of items"
di as result "{hline}"
di
descitems `varlist', partition(`partition')
di
}
if "`graphs'" != "" {
_graph `varlist', partition(`partition') scorename(`scorename') calcmethod(`calcmethod')
}
if "`repet'" != "" {
if "`descitems'" != "" {
di as result "{hline}"
di "Description of items (time 2)"
di as result "{hline}"
di
descitems `repet', partition(`partition')
di
}
}
if "`impute'" != "" {
*if "`noround'" != "" {
*di "Missing data handling (noround)"
*di
imp `varlist', partition(`partition') `noround'
if "`descitems'" != "" {
di as result "{hline}"
di "Description of items after missing data handling"
di as result "{hline}"
di
descitems `varlist', partition(`partition')
di
}
if "`graphs'" != "" {
*_graph `varlist', partition(`partition') scorename(`scorename')
}
if "`repet'" != "" {
imp `repet', partition(`partition') `noround'
if "`descitems'" != "" {
di as result "{hline}"
di "Description of items after missing data handling (time 2)"
di as result "{hline}"
di
descitems `repet', partition(`partition')
di
}
}
*}
/*else {
di "Missing data handling (round)"
di
imp `varlist', partition(`partition')
di "Description of items after missing data handling"
di
desc_item `varlist', partition(`partition')
if "`graphs'" != "" {
*_graph `varlist', partition(`partition') scorename(`scorename')
}
di "Description of items after missing data handling (time 2)"
di
if "`repet'" != "" {
imp `repet', partition(`partition')
desc_item `repet', partition(`partition')
}
di "{hline}"
}*/
}
/*
if "`imp'" == "" & "`noround'" != "" {
*di "noround"
di
imp `varlist', partition(`partition') `noround'
if "`desc_items'" != "" {
di "Description of items after missing data handling"
di
desc_item `varlist', partition(`partition')
}
if "`graphs'" != "" {
*_graph `varlist', partition(`partition') scorename(`scorename')
}
di "Description of items after missing data handling (time 2)"
di
imp `repet', partition(`partition') `noround'
desc_item `repet', partition(`partition')
di "{hline}"
}
*/
*di "{hline}"
if "`convdiv'" != "" {
convdiv `varlist', scorename(`scorename') partition(`partition') tconvdiv(`tconvdiv') `convdivboxplots'
*di as result "{hline}"
di
}
/*
if "`cfa'" != "" {
local cpt = 0
if "`cfa_ml'" != ""{
local method = "cfa_ml"
local cpt `cpt' + 1
}
if "`cfa_mlmv'" != "" {
local method = "cfa_mlmv"
local cpt `cpt' + 1
}
if "`cfa_adf'" != "" {
local method = "cfa_adf"
local cpt `cpt' + 1
}
else local method = "cfa_ml"
if `cpt' > 1 {
di in red "You must choose between cfa_ml, cfa_mlmv or cfa_adf (the options are exclusive)"
exit 119
}
cfa `varlist', scorename(`scorename') partition(`partition') `method' `cfa_stand'
di as result "{hline}"
}
*/
if "`cfa'" != "" {
cfa `varlist', scorename(`scorename') partition(`partition') cfamethod(`cfamethod') `cfastand'
*di as result "{hline}"
di
}
rel `varlist', scorename(`scorename') partition(`partition') alpha(`alpha') delta(`delta') h(`h') hjmin(`hjmin')
di
*di "{hline}"
if "`repet'" != "" {
repet `varlist', t2(`repet') partition(`partition') scorename(`scorename') `kappa' ickappa(`ickappa') calcmethod(`calcmethod')
*di "{hline}"
di
}
if "`kgv'" != "" {
kgv `scorename', categ(`kgv') `kgvboxplots' `kgvgroupboxplots'
*di "{hline}"
di
}
if "`conc'" != "" {
conc `scorename', comp(`conc') tconc(`tconc')
*di "{hline}"
}
end

View File

@ -0,0 +1,426 @@
/*
valid.dlg
*/
VERSION 12.1
POSITION . . 590 280
DIALOG main, label("Validation") tabtitle("General")
BEGIN
TEXT tx_var 10 10 250 ., ///
label("Items used for calculating score")
VARLIST vl_var @ +20 280 ., ///
label("Variables")
TEXT tx_n 10 +28 200 ., ///
label("Number of items")
EDIT ed_n @ +20 40 ., ///
label("number") ///
numonly
TEXT tx_score 110 58 180 ., ///
label("Name of the dimension (optional)")
EDIT ed_score 130 +20 100 ., ///
option(scorename) ///
BUTTON bt_add 260 75 32 22, ///
label("Add") ///
onpush(script az) ///
GROUPBOX gb_1 5 120 284 140,
TEXT tx_v 10 +10 100 ., ///
label("Items used")
VARLIST ed_v @ +20 250 ., ///
label("Items used")
TEXT tx_p @ +20 100 ., ///
label("Partition")
EDIT ed_p @ +20 150 ., ///
label("Partition") ///
option(partition) ///
tooltip("Defines the number of items in each dimension")
TEXT tx_s @ +20 . ., ///
label("Names of the dimensions (optional)")
EDIT ed_s @ +20 150 ., ///
label("Names of the dimensions") ///
option(scorename)
GROUPBOX gb_calc 330 13 245 90, ///
label("Calculation of scores")
RADIO rb_mean +10 +20 100 ., first label("Mean") ///
default(1)
RADIO rb_sum @ +20 100 ., label("Sum")
RADIO rb_stand @ +20 140 ., last label("Standardized scores") ///
tooltip("Set score from 0 to 100")
GROUPBOX gb_opt 330 120 245 140, ///
label("Options")
CHECKBOX ck_imp +10 +20 -20 ., ///
option(imp) ///
label("Imputing missing data") ///
onclickon(main.ck_nor.enable) ///
onclickoff(main.ck_nor.disable) ///
default(1)
CHECKBOX ck_nor +145 @ -20 ., ///
option(noround) ///
label("Do not round") ///
tooltip("Do not round imputed values")
CHECKBOX ck_desc 340 +28 -20 ., ///
option(descitems) ///
label("Description of items") ///
default(0)
CHECKBOX ck_graphs 340 +28 -20 ., ///
option(graphs) ///
label("Display graphs") ///
default(0) ///
tooltip("Display histogram of items, biplot of dimensions and biplot of items")
/*
CHECKBOX ck_cfa 340 +28 -20 ., ///
option(cfa) ///
label("Confirmatory factor analysis") ///
default(1)
CHECKBOX ck_conv @ +28 +10 ., ///
option(conv_div) ///
label("Convergent/discriminant validity") ///
default(1)
*/
END
DIALOG cfa, tabtitle("Confirmatory factor analysis")
BEGIN
CHECKBOX ck_cfa 10 10 200 ., label("Display confirmatory factor analysis") ///
option(cfa) ///
onclickon(script cfa_ck_cfa_on) ///
onclickoff(script cfa_ck_cfa_off)
GROUPBOX gb_cfa 10 +30 220 90 , ///
label("Estimation method:")
RADIO rb_ml +10 +24 110 ., first label("Maximum likelihood") ///
default(1)
RADIO rb_mlmv @ +20 200 ., label("Maximum likelihood with missing values")
RADIO rb_adf @ +20 140 ., last label("Asymptotic distribution free")
CHECKBOX ck_stand 14 +34 140 ., label("Standardize coefficients") ///
option(cfastand)
END
DIALOG conv, tabtitle("Convergent/divergent validity")
BEGIN
CHECKBOX ck_conv_div 10 10 220 ., ///
label("Display convergent/divergent validity") ///
option(convdiv) ///
onclickon(script conv_ck_conv_on) ///
onclickoff(script conv_ck_conv_off)
TEXT tx_conv1 10 +26 220 ., ///
label("Correlations between item and its own score")
TEXT tx_conv2 @ +17 @ ., ///
label("below this value will be highlighted")
EDIT ed_conv 250 42 35 ., ///
default(0.4) ///
option(tconvdiv) ///
numonly
CHECKBOX ck_conv 10 +42 170 ., ///
option(convdivboxplots) ///
label("Display boxplots of correlations") ///
default(1)
END
DIALOG rel, tabtitle("Reliability")
BEGIN
TEXT tx_rel_a 10 10 350 ., ///
label("Cronbach's alpha below this value will be highlighted")
EDIT ed_rel_a 320 @ 35 ., ///
default(0.7) ///
option(alpha) ///
numonly
TEXT tx_rel_d 10 +30 350 ., ///
label("Ferguson's delta below this value will be highlighted")
EDIT ed_rel_d 320 @ 35 ., ///
default(0.9) ///
option(delta) ///
numonly
TEXT tx_rel_H 10 +30 380 ., ///
label("Loevinger's H coefficient below this value will be highlighted")
EDIT ed_rel_H 320 @ 35 ., ///
default(0.3) ///
option(h) ///
numonly
TEXT tx_rel_h 10 +30 380 ., ///
label("Loevinger's Hj coefficient below this value will be highlighted")
EDIT ed_rel_h 320 @ 35 ., ///
default(0.3) ///
option(hjmin) ///
numonly
END
DIALOG rep, tabtitle("Reproducibility")
BEGIN
TEXT tx_rep 10 10 250 ., ///
label("Items used for calculating scores (time 2)")
VARLIST vl_rep @ +20 @ ., ///
option(repet) ///
label("Items time 2")
CHECKBOX ck_kappa @ +35 100 ., ///
label("Kappa statistic") ///
option(kappa) ///
onclickon(script rep_ck_kappa_on) ///
onclickoff(script rep_ck_kappa_off)
CHECKBOX ck_ickappa @ +25 280 ., ///
label("Confidence interval for kappa") ///
onclickon(script rep_ck_ickappa_on) ///
onclickoff(script rep_ck_ickappa_off)
TEXT tx_boot @ +25 220 ., ///
label("Number of bootstrap replications to estimate")
TEXT tx_boot2 @ +15 220 ., ///
label("confidence interval (if items are polytomous):")
SPINNER sp_ickappa +220 -7 45 ., ///
label("Number of bootstrap replications") min(1) max(1000) ///
default(20) ///
option(ickappa)
END
DIALOG kgv, tabtitle("Known-groups validity")
BEGIN
TEXT tx_kgv 10 10 250 ., ///
label("Select qualitative variables for known-groups validity")
VARLIST vl_kgv @ +28 250 ., ///
option(kgv) ///
label("kgv")
CHECKBOX ck_kgv @ +25 150 ., ///
label("Display boxplots") ///
option(kgvboxplots) ///
default(0) ///
onclickon(kgv.ck_kgv_group.enable) ///
onclickoff(kgv.ck_kgv_group.disable)
CHECKBOX ck_kgv_group @ +25 190 ., ///
label("Group boxplots in one graph") ///
option(kgvgroupboxplots) ///
default(0)
END
DIALOG conc, tabtitle("Concurrent validity")
BEGIN
TEXT tx_conc 10 10 186 ., ///
label("Select scores from other scales")
VARLIST vl_conc @ +28 250 ., ///
option(conc) ///
label("conc")
TEXT tx_t_conc @ +30 350 ., ///
label("Correlations above this value will be highlighted (absolute value)")
EDIT ed_t_conc 320 @ 30 ., ///
default(0.4) ///
option(tconc) ///
numonly
END
PROGRAM az
BEGIN
main.ed_score.withvalue main.ed_s.append "@ "
main.vl_var.withvalue main.vl_v.append "@ "
main.ed_n.withvalue main.ed_p.append "@ "
main.vl_var.setvalue ""
main.ed_n.setvalue ""
main.ed_score.setvalue ""
END
SCRIPT rep_ck_kappa_on
BEGIN
rep.ck_ickappa.enable
END
SCRIPT rep_ck_kappa_off
BEGIN
rep.ck_ickappa.disable
rep.sp_ickappa.disable
rep.ck_ickappa.setoff
END
SCRIPT rep_ck_ickappa_on
BEGIN
rep.sp_ickappa.enable
rep.tx_boot.enable
rep.tx_boot2.enable
END
SCRIPT rep_ck_ickappa_off
BEGIN
rep.sp_ickappa.disable
rep.sp_ickappa.setdefault 0
rep.tx_boot.disable
rep.tx_boot2.disable
END
SCRIPT cfa_ck_cfa_on
BEGIN
cfa.gb_cfa.enable
cfa.rb_ml.enable
cfa.rb_mlmv.enable
cfa.rb_adf.enable
cfa.ck_stand.enable
END
SCRIPT cfa_ck_cfa_off
BEGIN
cfa.gb_cfa.disable
cfa.rb_ml.disable
cfa.rb_mlmv.disable
cfa.rb_adf.disable
cfa.ck_stand.disable
END
SCRIPT conv_ck_conv_on
BEGIN
conv.tx_conv1.enable
conv.tx_conv2.enable
conv.ed_conv.enable
conv.ck_conv.enable
END
SCRIPT conv_ck_conv_off
BEGIN
conv.tx_conv1.disable
conv.tx_conv2.disable
conv.ed_conv.disable
conv.ck_conv.disable
END
OK ok1, label("OK")
CANCEL can1, label("Cancel")
SUBMIT sub1, label("Submit")
HELP hlp1, view("help valid")
RESET res1
COPY copy1
PROGRAM command
BEGIN
put "valid "
require main.ed_v
put main.ed_v
require main.ed_p
beginoptions
optionarg main.ed_p
optionarg main.ed_s
option main.ck_imp
option main.ck_nor
option main.ck_desc
option main.ck_graphs
if main.rb_mean{
put " calcmethod("
put "mean"
put ")"
}
if main.rb_sum{
put " calcmethod("
put "sum"
put ")"
}
if main.rb_stand{
put " calcmethod("
put "stand"
put ")"
}
option cfa.ck_cfa
if cfa.rb_ml{
put " cfamethod("
put "ml"
put ")"
}
if cfa.rb_mlmv{
put " cfamethod("
put "mlmv"
put ")"
}
if cfa.rb_adf{
put " cfamethod("
put "adf"
put ")"
}
option cfa.ck_stand
option conv.ck_conv_div
optionarg conv.ed_conv
option conv.ck_conv
optionarg rel.ed_rel_a
optionarg rel.ed_rel_d
optionarg rel.ed_rel_H
optionarg rel.ed_rel_h
optionarg rep.vl_rep
option rep.ck_kappa
optionarg rep.sp_ickappa
optionarg kgv.vl_kgv
option kgv.ck_kgv
option kgv.ck_kgv_group
optionarg conc.vl_conc
optionarg conc.ed_t_conc
endoptions
END

View File

@ -0,0 +1,125 @@
{smcl}
{* 2013}{...}
{hline}
help for {hi:valid}
{hline}
{title:Syntax}
{p 8 14 2}{cmd:valid} {it:varlist}, {bf:partition}({it:numlist}) [{it:options}]
{p 4 4 2}{it:varlist} contains the variables (items) used to calculate the scores. The first items of {it:varlist} compose the first dimension, the following items define the second dimension, and so on.
{p 4 4 2}{cmd:partition} permits to define in {it:numlist} the number of items in each dimension.
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Options}
{synopt : {opt sco:rename(string)}}define the names of the dimensions{p_end}
{synopt : {opt imp:ute}}impute missing item responses{p_end}
{synopt : {help valid##impute_options:{it:impute_options}}}options for imputation of missing data {p_end}
{synopt : {opt calc:method(method)}}define how scores are calculated{p_end}
{synopt : {opt desc:items}}display a description of items and dimensions{p_end}
{synopt : {opt graph:s}}display graphs for items description{p_end}
{synopt : {opt cfa}}assess structural validity by performing a confirmatory factor analysis{p_end}
{synopt : {help valid##cfa_options:{it:cfa_options}}}options for confirmatory factor analysis{p_end}
{synopt : {opt conv:div}}assess convergent and divergent validity assessment{p_end}
{synopt : {help valid##conv_div_options:{it:conv_div_options}}}options for convergent and divergent validity{p_end}
{synopt : {help valid##reliability_options:{it:reliability_options}}}options for reliability assessment{p_end}
{synopt : {opt rep:et(varlist)}}assess reproducibility of scores and items{p_end}
{synopt : {help valid##repet_options:{it:repet_options}}}options for reproducibility{p_end}
{synopt : {opt kgv(varlist)}}assess known-groups validity by using qualitative variable(s){p_end}
{synopt : {help valid##kgv_options:{it:kgv_options}}}options for known-groups validity assessment{p_end}
{synopt : {opt conc(varlist)}}assess concurrent validity{p_end}
{synopt : {help valid##conc_options:{it:conc_options}}}options for concurrent validity assessment{p_end}
{p2colreset}{...}
{title:Description}
{phang}{cmd:valid} assesses validity and reliability of a multidimensional scale. Specifically it evaluates
structural validity, convergent and divergent validity, reproducibility, known-groups validity, internal consistency, scalability and sensitivity.
{marker options}{...}
{title:Options}
{dlgtab:Options}
{phang}{opt sco:rename(string)} allows defining the names of the dimensions. If the option is not used then dimensions are named {it:Dim1}, {it:Dim2},...
{phang}{opt imp:ute} imputes missing items responses with Person Mean Substitution method applied in each dimension. Missing data are imputed only if the number of
missing values in the dimension is less than half the number of items in the dimension.
{marker impute_options}{...}
{phang}{it:impute_options} allow specifying options for imputation of missing. By default, imputed values are rounded to the nearest whole number. If {opt nor:ound} is precised then imputed values
are not rounded. If {opt impute} is absent then {opt noround} is ignored.
{phang}{opt calc:method(method)} defines the method used for calculating scores. {it:method} may be either {bf:mean} (default), {bf:sum} or {bf:stand}(set scores from 0 to 100).
{phang}{opt desc:items} displays a description of items. This option gives missing data rate per item and distribution of item responses. It also gives Cronbach's alpha for each item, which is the alpha statistic
calculated by removing the item from the dimension. Moreover, the option computes Loevinger's Hj coefficients and the number of non significant Hjk. See {help loevh} for details about Loevinger's coefficients.
{phang}{opt graph:s} displays graphs for items and dimensions description. It provides histograms of scores, a biplot of dimensions and a biplot of items.
{phang}{opt cfa} performs a confirmatory factor analysis with Stata's {help sem} command. It displays estimations of coefficients and several goodness-of-fit indices.
{marker cfa_options}{...}
{phang}{it:cfa_options} allow specifying options for confirmatory factor analysis. {opt cfam:ethod}({it:method}) specifies the method of estimation of parameters. {it:method} may be either {bf:ml} (maximum
likelihood), {bf:mlmv} ({bf:ml} with missing values) or {bf:adf} (asymptotic distribution free). The {opt cfas:tand} option displays standardized coefficients.
{phang}{opt conv:div} assesses convergent and divergent validity. The option displays the matrix of correlations between items and dimensions.
{marker convdiv_options}{...}
{phang}{it:conv_div_options} allow specifying options for convergent and divergent validity. {opt tconv:div(#)} defines a threshold for highlighting some values. # is a real number between 0 and 1 which is equal to 0.4 by
default. Correlations between items and their own score are printed
in red if it is less than #. Moreover, if an item is less correlated with its own dimension than with another one the correlation is printed
in red. The {opt convdivb:oxplots} option displays boxplots for assessing convergent and divergent validity. The boxes represent the correlations between the items of a given dimension and all dimensions. So the box of correlations between items of a given dimension and its score must be higher than other
boxes. There is as many boxplots (graphs) as dimensions.
{marker reliability_options}{...}
{phang}{it:reliability_options} allow defining the thresholds for reliability indices. {opt a:lpha(#)} defines a threshold for Cronbach's alpha (see {help alpha}). # is a real number between 0 and 1 which is equal to 0.7
by default. Cronbach's alpha coefficients less than # are printed in red. {opt d:elta(#)} defines a threshold for Ferguson's delta coefficient (see {help delta}). # is a real number between 0 and 1 which is equal to 0.9
by default. Ferguson's delta coefficients less than # are printed in red. {opt h(#)} defines a threshold for Loevinger's H coefficient (see {help loevh}). # is a real number between 0 and 1 which is equal to
0.3 by default. Loevinger's H coefficients less than # are printed in red. {opt hj:min(#)}
defines a threshold for Loevinger's Hj coefficients. The displayed value is the minimum Hj coefficient for a item in the dimension. (see {help loevh}). # is a real number between 0 and 1 which is equal to
0.3 by default. If the minimum Loevinger's Hj coefficient is less than # then it is printed in red and the corresponding item is displayed.
{phang}{opt rep:et(varlist)} assesses reproducibility of scores by precising in {it:varlist} the variables corresponding to responses at time 2. Scores are calculated according to the {opt partition()} option. Intraclass
Correlation Coefficients (ICC) for scores and their 95% confidence interval are computed with Stata's {help icc} command.
{marker repet_options}{...}
{phang}{it:repet_options} display information about reproducibility of items. The {opt kap:pa} option computes kappa statistic for items with Stata's {help kap} command. The {opt ickap:pa(#)} calculates
confidence intervals for
kappa statistics. # is the number of replications for bootstrap used to estimate confidence intervals if items are polytomous. See {help kapci} for more details about calculation of confidence intervals for kappa's
coefficients. If the {opt kappa} option is absent then {opt ickappa(#)} is ignored.
{phang}{opt kgv(varlist)} assesses known-groups validity according to the grouping variables precised in {it:varlist}.
{marker kgv_options}{...}
{phang}{it:kgv_options} allow to display graphs for known-groups validity. The {opt kgvb:oxplots} option draws boxplots of scores split into groups of individuals. The {opt kgvg:roupboxplots} option groups
all boxplots in one graph. If {opt kgvboxplots} is absent then {opt kgvboxplotsgroup} is ignored.
{phang}{opt conc(varlist)} assesses concurrent validity with variables precised in {it:varlist}. These variables are scores from one or several other scales.
{marker conc_options}{...}
{phang}{it:conc_options} allow to specify options for concurrent validity. The {opt tc:onc(#)} option defines a threshold for correlations between scores and those of other scales in {it:varlist}. Correlation
coefficients greater than # are displayed in bold.
{marker examples}{...}
{title:Examples}
{phang2}{cmd:. valid item1-item20, part(5 4 6 5)}{p_end}
{phang2}{cmd:. valid item1-item20, part(5 4 6 5) imp graphs cfa cfastand convdiv convdivboxplots kgv(factor_variable) kgvboxplots conc(scoreA-scoreD)}{p_end}
{phang2}{cmd:. valid item1-item20, part(5 4 6 5) imp rep(item1bis-item20bis) kappa}{p_end}
{marker alsosee}{...}
{title:Also see}
{p 4 13 2}help for {help alpha}, {help delta}, {help loevh}, {help icc}, {help kapci}.{p_end}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,426 @@
/*
valid.dlg
*/
VERSION 12.1
POSITION . . 590 280
DIALOG main, label("Validation") tabtitle("General")
BEGIN
TEXT tx_var 10 10 250 ., ///
label("Items used for calculating score")
VARLIST vl_var @ +20 280 ., ///
label("Variables")
TEXT tx_n 10 +28 200 ., ///
label("Number of items")
EDIT ed_n @ +20 40 ., ///
label("number") ///
numonly
TEXT tx_score 110 58 180 ., ///
label("Name of the dimension (optional)")
EDIT ed_score 130 +20 100 ., ///
option(scorename) ///
BUTTON bt_add 260 75 32 22, ///
label("Add") ///
onpush(script az) ///
GROUPBOX gb_1 5 120 284 140,
TEXT tx_v 10 +10 100 ., ///
label("Items used")
VARLIST ed_v @ +20 250 ., ///
label("Items used")
TEXT tx_p @ +20 100 ., ///
label("Partition")
EDIT ed_p @ +20 150 ., ///
label("Partition") ///
option(partition) ///
tooltip("Defines the number of items in each dimension")
TEXT tx_s @ +20 . ., ///
label("Names of the dimensions (optional)")
EDIT ed_s @ +20 150 ., ///
label("Names of the dimensions") ///
option(scorename)
GROUPBOX gb_calc 330 13 245 90, ///
label("Calculation of scores")
RADIO rb_mean +10 +20 100 ., first label("Mean") ///
default(1)
RADIO rb_sum @ +20 100 ., label("Sum")
RADIO rb_stand @ +20 140 ., last label("Standardized scores") ///
tooltip("Set score from 0 to 100")
GROUPBOX gb_opt 330 120 245 140, ///
label("Options")
CHECKBOX ck_imp +10 +20 -20 ., ///
option(imp) ///
label("Imputing missing data") ///
onclickon(main.ck_nor.enable) ///
onclickoff(main.ck_nor.disable) ///
default(1)
CHECKBOX ck_nor +145 @ -20 ., ///
option(noround) ///
label("Do not round") ///
tooltip("Do not round imputed values")
CHECKBOX ck_desc 340 +28 -20 ., ///
option(descitems) ///
label("Description of items") ///
default(0)
CHECKBOX ck_graphs 340 +28 -20 ., ///
option(graphs) ///
label("Display graphs") ///
default(0) ///
tooltip("Display histogram of items, biplot of dimensions and biplot of items")
/*
CHECKBOX ck_cfa 340 +28 -20 ., ///
option(cfa) ///
label("Confirmatory factor analysis") ///
default(1)
CHECKBOX ck_conv @ +28 +10 ., ///
option(conv_div) ///
label("Convergent/discriminant validity") ///
default(1)
*/
END
DIALOG cfa, tabtitle("Confirmatory factor analysis")
BEGIN
CHECKBOX ck_cfa 10 10 200 ., label("Display confirmatory factor analysis") ///
option(cfa) ///
onclickon(script cfa_ck_cfa_on) ///
onclickoff(script cfa_ck_cfa_off)
GROUPBOX gb_cfa 10 +30 220 90 , ///
label("Estimation method:")
RADIO rb_ml +10 +24 110 ., first label("Maximum likelihood") ///
default(1)
RADIO rb_mlmv @ +20 200 ., label("Maximum likelihood with missing values")
RADIO rb_adf @ +20 140 ., last label("Asymptotic distribution free")
CHECKBOX ck_stand 14 +34 140 ., label("Standardize coefficients") ///
option(cfastand)
END
DIALOG conv, tabtitle("Convergent/divergent validity")
BEGIN
CHECKBOX ck_conv_div 10 10 220 ., ///
label("Display convergent/divergent validity") ///
option(convdiv) ///
onclickon(script conv_ck_conv_on) ///
onclickoff(script conv_ck_conv_off)
TEXT tx_conv1 10 +26 220 ., ///
label("Correlations between item and its own score")
TEXT tx_conv2 @ +17 @ ., ///
label("below this value will be highlighted")
EDIT ed_conv 250 42 35 ., ///
default(0.4) ///
option(tconvdiv) ///
numonly
CHECKBOX ck_conv 10 +42 170 ., ///
option(convdivboxplots) ///
label("Display boxplots of correlations") ///
default(1)
END
DIALOG rel, tabtitle("Reliability")
BEGIN
TEXT tx_rel_a 10 10 350 ., ///
label("Cronbach's alpha below this value will be highlighted")
EDIT ed_rel_a 320 @ 35 ., ///
default(0.7) ///
option(alpha) ///
numonly
TEXT tx_rel_d 10 +30 350 ., ///
label("Ferguson's delta below this value will be highlighted")
EDIT ed_rel_d 320 @ 35 ., ///
default(0.9) ///
option(delta) ///
numonly
TEXT tx_rel_H 10 +30 380 ., ///
label("Loevinger's H coefficient below this value will be highlighted")
EDIT ed_rel_H 320 @ 35 ., ///
default(0.3) ///
option(h) ///
numonly
TEXT tx_rel_h 10 +30 380 ., ///
label("Loevinger's Hj coefficient below this value will be highlighted")
EDIT ed_rel_h 320 @ 35 ., ///
default(0.3) ///
option(hjmin) ///
numonly
END
DIALOG rep, tabtitle("Reproducibility")
BEGIN
TEXT tx_rep 10 10 250 ., ///
label("Items used for calculating scores (time 2)")
VARLIST vl_rep @ +20 @ ., ///
option(repet) ///
label("Items time 2")
CHECKBOX ck_kappa @ +35 100 ., ///
label("Kappa statistic") ///
option(kappa) ///
onclickon(script rep_ck_kappa_on) ///
onclickoff(script rep_ck_kappa_off)
CHECKBOX ck_ickappa @ +25 280 ., ///
label("Confidence interval for kappa") ///
onclickon(script rep_ck_ickappa_on) ///
onclickoff(script rep_ck_ickappa_off)
TEXT tx_boot @ +25 220 ., ///
label("Number of bootstrap replications to estimate")
TEXT tx_boot2 @ +15 220 ., ///
label("confidence interval (if items are polytomous):")
SPINNER sp_ickappa +220 -7 45 ., ///
label("Number of bootstrap replications") min(1) max(1000) ///
default(20) ///
option(ickappa)
END
DIALOG kgv, tabtitle("Known-groups validity")
BEGIN
TEXT tx_kgv 10 10 250 ., ///
label("Select qualitative variables for known-groups validity")
VARLIST vl_kgv @ +28 250 ., ///
option(kgv) ///
label("kgv")
CHECKBOX ck_kgv @ +25 150 ., ///
label("Display boxplots") ///
option(kgvboxplots) ///
default(0) ///
onclickon(kgv.ck_kgv_group.enable) ///
onclickoff(kgv.ck_kgv_group.disable)
CHECKBOX ck_kgv_group @ +25 190 ., ///
label("Group boxplots in one graph") ///
option(kgvgroupboxplots) ///
default(0)
END
DIALOG conc, tabtitle("Concurrent validity")
BEGIN
TEXT tx_conc 10 10 186 ., ///
label("Select scores from other scales")
VARLIST vl_conc @ +28 250 ., ///
option(conc) ///
label("conc")
TEXT tx_t_conc @ +30 350 ., ///
label("Correlations above this value will be highlighted (absolute value)")
EDIT ed_t_conc 320 @ 30 ., ///
default(0.4) ///
option(tconc) ///
numonly
END
PROGRAM az
BEGIN
main.ed_score.withvalue main.ed_s.append "@ "
main.vl_var.withvalue main.vl_v.append "@ "
main.ed_n.withvalue main.ed_p.append "@ "
main.vl_var.setvalue ""
main.ed_n.setvalue ""
main.ed_score.setvalue ""
END
SCRIPT rep_ck_kappa_on
BEGIN
rep.ck_ickappa.enable
END
SCRIPT rep_ck_kappa_off
BEGIN
rep.ck_ickappa.disable
rep.sp_ickappa.disable
rep.ck_ickappa.setoff
END
SCRIPT rep_ck_ickappa_on
BEGIN
rep.sp_ickappa.enable
rep.tx_boot.enable
rep.tx_boot2.enable
END
SCRIPT rep_ck_ickappa_off
BEGIN
rep.sp_ickappa.disable
rep.sp_ickappa.setdefault 0
rep.tx_boot.disable
rep.tx_boot2.disable
END
SCRIPT cfa_ck_cfa_on
BEGIN
cfa.gb_cfa.enable
cfa.rb_ml.enable
cfa.rb_mlmv.enable
cfa.rb_adf.enable
cfa.ck_stand.enable
END
SCRIPT cfa_ck_cfa_off
BEGIN
cfa.gb_cfa.disable
cfa.rb_ml.disable
cfa.rb_mlmv.disable
cfa.rb_adf.disable
cfa.ck_stand.disable
END
SCRIPT conv_ck_conv_on
BEGIN
conv.tx_conv1.enable
conv.tx_conv2.enable
conv.ed_conv.enable
conv.ck_conv.enable
END
SCRIPT conv_ck_conv_off
BEGIN
conv.tx_conv1.disable
conv.tx_conv2.disable
conv.ed_conv.disable
conv.ck_conv.disable
END
OK ok1, label("OK")
CANCEL can1, label("Cancel")
SUBMIT sub1, label("Submit")
HELP hlp1, view("help valid")
RESET res1
COPY copy1
PROGRAM command
BEGIN
put "valid "
require main.ed_v
put main.ed_v
require main.ed_p
beginoptions
optionarg main.ed_p
optionarg main.ed_s
option main.ck_imp
option main.ck_nor
option main.ck_desc
option main.ck_graphs
if main.rb_mean{
put " calcmethod("
put "mean"
put ")"
}
if main.rb_sum{
put " calcmethod("
put "sum"
put ")"
}
if main.rb_stand{
put " calcmethod("
put "stand"
put ")"
}
option cfa.ck_cfa
if cfa.rb_ml{
put " cfamethod("
put "ml"
put ")"
}
if cfa.rb_mlmv{
put " cfamethod("
put "mlmv"
put ")"
}
if cfa.rb_adf{
put " cfamethod("
put "adf"
put ")"
}
option cfa.ck_stand
option conv.ck_conv_div
optionarg conv.ed_conv
option conv.ck_conv
optionarg rel.ed_rel_a
optionarg rel.ed_rel_d
optionarg rel.ed_rel_H
optionarg rel.ed_rel_h
optionarg rep.vl_rep
option rep.ck_kappa
optionarg rep.sp_ickappa
optionarg kgv.vl_kgv
option kgv.ck_kgv
option kgv.ck_kgv_group
optionarg conc.vl_conc
optionarg conc.ed_t_conc
endoptions
END

View File

@ -0,0 +1,143 @@
{smcl}
{* 2013}{...}
{hline}
help for {hi:validscale}{right:Bastien Perrot}
{hline}
{title:Syntax}
{p 8 14 2}{cmd:validscale} {it:varlist}, {opt part:ition}({it:numlist}) [{it:options}]
{p 4 4 2}{it:varlist} contains the variables (items) used to compute the scores. The first items of {it:varlist} compose the first dimension, the following items define the second dimension, and so on.
{p 4 4 2}{cmd:partition} allows defining in {it:numlist} the number of items in each dimension.
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Options}
{synopt : {opt scoren:ame(string)}}define the names of the dimensions{p_end}
{synopt : {opt scores(varlist)}}use scores from the dataset{p_end}
{synopt : {opt mod:alities(numlist)}}define minimum and maximum response categories for the items{p_end}
{synopt : {opt imp:ute(method)}}impute missing item responses{p_end}
{synopt : {help validscale##impute_options:{it:impute_options}}}options for imputation of missing data {p_end}
{synopt : {opt comps:core(method)}}define how scores are computed{p_end}
{synopt : {opt desc:items}}display a descriptive analysis of items and dimensions{p_end}
{synopt : {opt graph:s}}display graphs for items description{p_end}
{synopt : {opt cfa}}assess structural validity of the scale by performing a confirmatory factor analysis (CFA){p_end}
{synopt : {help validscale##cfa_options:{it:cfa_options}}}options for confirmatory factor analysis (CFA){p_end}
{synopt : {opt conv:div}}assess convergent and divergent validities assessment{p_end}
{synopt : {help validscale##convdiv_options:{it:conv_div_options}}}options for convergent and divergent validities{p_end}
{synopt : {help validscale##reliability_options:{it:reliability_options}}}options for reliability assessment{p_end}
{synopt : {opt rep:et(varlist)}}assess reproducibility of scores and items{p_end}
{synopt : {help validscale##repet_options:{it:repet_options}}}options for reproducibility{p_end}
{synopt : {opt kgv(varlist)}}assess known-groups validity by using qualitative variable(s){p_end}
{synopt : {help validscale##kgv_options:{it:kgv_options}}}options for known-groups validity assessment{p_end}
{synopt : {opt conc(varlist)}}assess concurrent validity{p_end}
{synopt : {help validscale##conc_options:{it:conc_options}}}options for concurrent validity assessment{p_end}
{p2colreset}{...}
{title:Description}
{phang}{cmd:validscale} assesses validity and reliability of a multidimensional scale. Elements to provide
structural validity, convergent and divergent validity, reproducibility, known-groups validity, internal consistency, scalability and sensitivity are computed.
{marker options}{...}
{title:Options}
{dlgtab:Options}
{phang}{opt scoren:ame(string)} allows defining the names of the dimensions. If the option is not used, the dimensions are named {it:Dim1}, {it:Dim2},... unless {opt scores(varlist)} is used.
{phang}{opt scores(varlist)} allows selecting scores from the dataset. {opt scores(varlist)} and {opt scorename(string)} cannot be used together.
{phang}{opt mod:alities(numlist)} allows specifying the minimum and maximum possible values for items responses. If all the items have the same response
categories, the user may specify these 2 values in {it:numlist}. If the items response categories differ from a dimension to another, the user must define the possible minimum and maximum values of items responses for each
dimension. So the number of elements in {it:numlist} must be equal to the number of dimensions times 2. Eventually, the user may specify the minimum and maximum response categories for each item. In this case, the
number of elements in {it:numlist} must be equal to the number of items times 2. By default, the minimum and maximum values are assumed to be the minimum and maximum for each item.
{phang}{opt imp:ute(method)} imputes missing items responses with Person Mean Substitution ({bf:pms}) or Two-way imputation method applied in each dimension ({bf:mi}). With PMS method, missing data are imputed only if the number of
missing values in the dimension is less than half the number of items in the dimension.
{marker impute_options}{...}
{phang}{it:impute_options} allow specifying options for imputation of missing values. By default, imputed values are rounded to the nearest whole number but with the {opt nor:ound} option, imputed values
are not rounded. If {opt impute} is absent then {opt noround} is ignored.
{phang}{opt comp:score(method)} defines the method used to compute the scores. {it:method} may be either {bf:mean} (default), {bf:sum} or {bf:stand}(set scores from 0 to 100). {opt comp:score(method)} is ignored
if the {opt scores(varlist)} option is used.
{phang}{opt desc:items} displays a descriptive analysis of the items. This option displays missing data rate per item and distribution of item responses. It also computes for each item the Cronbach's alphas
obtained by omitting each item in each dimension. Moreover, the option computes Loevinger's Hj coefficients and the number of non-significant Hjk. See {help loevh} for details about Loevinger's coefficients.
{phang}{opt graph:s} displays graphs for items and dimensions descriptive analyses. It provides histograms of scores, a biplot of the scores and a graph showing the correlations between the items.
{phang}{opt cfa} performs a confirmatory factor analysis using {help sem} command. It displays estimations of parameters and several goodness-of-fit indices.
{marker cfa_options}{...}
{phang}{it:cfa_options} allow specifying options for confirmatory factor analysis (CFA). {opt cfam:ethod}({it:method}) specifies the method to estimate the parameters. {it:method} may be either {bf:ml} (maximum
likelihood), {bf:mlmv} ({bf:ml} with missing values) or {bf:adf} (asymptotic distribution free). The {opt cfas:tand} option displays standardized coefficients.
The {opt cfac:ovs} option allows adding covariances between measurement errors. You can look at the examples to see the syntax of this option. The {opt cfaa:uto} option adds automatically the covariances
of measurement errors found with the {help estat mindices} command. The option only adds the covariances of measurement errors within a dimension.
{phang}{opt conv:div} assesses convergent and divergent validities. The option displays the matrix of correlations between items and rest-scores. If {opt scores(varlist)} is used, then the correlations coefficients are computed between
items and scores of {opt scores(varlist)}.
{marker convdiv_options}{...}
{phang}{it:conv_div_options} allow specifying options for convergent and divergent validity. {opt tconv:div(#)} defines a threshold for highlighting some values. # is a real number between 0 and 1 which is equal to 0.4 by
default. Correlations between items and their own score are displayed
in red if it is less than #. Moreover, if an item has a smaller correlation coefficient with the score of its own dimension than the correlation coefficient computed with other scores, this coefficient is displayed
in red. The {opt convdivb:oxplots} option displays boxplots for assessing convergent and divergent validities. The boxes represent the correlation coefficients between the items of a given dimension and all scores. Thus the
box of correlation coefficients between items of a given dimension and the corresponding score must be higher than other
boxes. There are as many boxplots as dimensions.
{marker reliability_options}{...}
{phang}{it:reliability_options} allow defining the thresholds for reliability indices. {opt a:lpha(#)} defines a threshold for Cronbach's alpha (see {help alpha}). # is a real number between 0 and 1 which is equal to 0.7
by default. Cronbach's alpha coefficients less than # are printed in red. {opt d:elta(#)} defines a threshold for Ferguson's delta coefficient (see {help delta}). Delta coefficients are computed only if {opt compscore}({it:sum}) is used
and {opt scores}({it:varlist)} is not used. # is a real number between 0 and 1 which is equal to 0.9
by default. Ferguson's delta coefficients less than # are printed in red. {opt h(#)} defines a threshold for Loevinger's H coefficient (see {help loevh}). # is a real number between 0 and 1 which is equal to
0.3 by default. Loevinger's H coefficients less than # are printed in red. {opt hj:min(#)}
defines a threshold for Loevinger's Hj coefficients. The displayed value is the minimal Hj coefficient for a item in the dimension. (see {help loevh}). # is a real number between 0 and 1 which is equal to
0.3 by default. If the minimal Loevinger's Hj coefficient is less than # then it is printed in red and the corresponding item is displayed.
{phang}{opt rep:et(varlist)} assesses reproducibility of scores by defining in {it:varlist} the variables corresponding to responses at time 2 (in the same order than for time 1). Scores are computed according to
the {opt partition()} option. Intraclass
Correlation Coefficients (ICC) for scores and their 95% confidence interval are computed with Stata's {help icc} command.
{marker repet_options}{...}
{phang}{it:repet_options} display information about reproducibility of items. The {opt kap:pa} option computes kappa statistic for items with Stata's {help kap} command. The {opt ickap:pa(#)} option computes
confidence intervals for
kappa statistics using {help kapci}. # is the number of replications for bootstrap used to estimate confidence intervals if items are polytomous. If they are dichotomous, an analytical method is used. See {help kapci} for more details about
calculation of
confidence intervals for kappa's
coefficients. If the {opt kappa} option is absent then the {opt ickappa(#)} option is ignored. {opt scores2}({it:varlist}) allows selecting scores at time 2 from the dataset.
{phang}{opt kgv(varlist)} assesses known-groups validity according to the grouping variables defined in {it:varlist}. The option performs an ANOVA which compares the scores between groups of individuals, constructed with variables in {it:varlist}.
{marker kgv_options}{...}
{phang}{it:kgv_options} allow displaying graphs for known-groups validity. The {opt kgvb:oxplots} option draws boxplots of the scores split into groups of individuals. The {opt kgvg:roupboxplots} option groups
all boxplots in one graph. If {opt kgvboxplots} is absent then the {opt kgvgroupboxplots} option is ignored.
{phang}{opt conc(varlist)} assesses concurrent validity with variables precised in {it:varlist}. These variables are scores from one or several other scales.
{marker conc_options}{...}
{phang}{it:conc_options} allow specifying options for concurrent validity. The {opt tc:onc(#)} option defines a threshold for correlation coefficients between the computed scores and the scores of other scales defined in {it:varlist}. Correlation
coefficients greater than # (0.4 by default) are displayed in bold.
{marker examples}{...}
{title:Examples}
{phang2}{cmd:. validscale item1-item20, part(5 4 6 5)}{p_end}
{phang2}{cmd:. validscale item1-item20, part(5 4 6 5) imp graphs cfa cfastand cfacovs(item1*item3 item5*item7 item17*item18) convdiv convdivboxplots kgv(factor_variable) kgvboxplots conc(scoreA-scoreD)}{p_end}
{phang2}{cmd:. validscale item1-item20, part(5 4 6 5) imp scores(s1-s4) rep(item1bis-item20bis) scores2(s1bis-s4bis) kappa}{p_end}
{marker alsosee}{...}
{title:Also see}
{p 4 13 2}help for {help alpha}, {help delta}, {help loevh}, {help icc}, {help kapci}.{p_end}

View File

@ -0,0 +1,207 @@
{smcl}
{* 2013}{...}
{hline}
help for {hi:validscale}{right:Bastien Perrot}
{hline}
{title:Syntax}
{p 8 14 2}{cmd:validscale} {it:varlist}, {opt part:ition}({it:numlist}) [{it:options}]
{p 4 4 2}{it:varlist} contains the variables (items) used to compute the scores. The first items of {it:varlist} compose the first dimension, the following items define the second dimension, and so on.
{p 4 4 2}{cmd:partition} allows defining in {it:numlist} the number of items in each dimension.
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Options}
{synopt : {opt scoren:ame(string)}}define the names of the dimensions{p_end}
{synopt : {opt scores(varlist)}}use scores from the dataset{p_end}
{synopt : {opt cat:egories(numlist)}}define minimum and maximum response categories for the items{p_end}
{synopt : {opt imp:ute(method)}}impute missing item responses{p_end}
{synopt : {help validscale##impute_options:{it:impute_options}}}options for imputation of missing data {p_end}
{synopt : {opt comps:core(method)}}define how scores are computed{p_end}
{synopt : {opt desc:items}}display a descriptive analysis of items and dimensions{p_end}
{synopt : {opt graph:s}}display graphs for items description{p_end}
{synopt : {opt cfa}}assess structural validity of the scale by performing a confirmatory factor analysis (CFA){p_end}
{synopt : {help validscale##cfa_options:{it:cfa_options}}}options for confirmatory factor analysis (CFA){p_end}
{synopt : {opt conv:div}}assess convergent and divergent validities assessment{p_end}
{synopt : {help validscale##convdiv_options:{it:conv_div_options}}}options for convergent and divergent validities{p_end}
{synopt : {help validscale##reliability_options:{it:reliability_options}}}options for reliability assessment{p_end}
{synopt : {opt rep:et(varlist)}}assess reproducibility of scores and items{p_end}
{synopt : {help validscale##repet_options:{it:repet_options}}}options for reproducibility{p_end}
{synopt : {opt kgv(varlist)}}assess known-groups validity by using qualitative variable(s){p_end}
{synopt : {help validscale##kgv_options:{it:kgv_options}}}options for known-groups validity assessment{p_end}
{synopt : {opt conc(varlist)}}assess concurrent validity{p_end}
{synopt : {help validscale##conc_options:{it:conc_options}}}options for concurrent validity assessment{p_end}
{synopt : {opt * }}options from {help sem_estimation_options} command (additional estimation options for {help validscale##cfa_options:{it:cfa_options}}) {p_end}
{p2colreset}{...}
{title:Description}
{phang}{cmd:validscale} assesses validity and reliability of a multidimensional scale. Elements to provide
structural validity, convergent and divergent validity, reproducibility, known-groups validity, internal consistency, scalability and sensitivity are computed. {cmd:validscale} can be used with a dialog box by typing {stata db validscale}.
{marker options}{...}
{title:Options}
{dlgtab:Options}
{phang}{opt scoren:ame(string)} allows defining the names of the dimensions. If the option is not used, the dimensions are named {it:Dim1}, {it:Dim2},... unless {opt scores(varlist)} is used.
{phang}{opt scores(varlist)} allows selecting scores from the dataset. {opt scores(varlist)} and {opt scorename(string)} cannot be used together.
{phang}{opt cat:egories(numlist)} allows specifying the minimum and maximum possible values for items responses. If all the items have the same response
categories, the user may specify these 2 values in {it:numlist}. If the items response categories differ from a dimension to another, the user must define the possible minimum and maximum values of items responses for each
dimension. So the number of elements in {it:numlist} must be equal to the number of dimensions times 2. Eventually, the user may specify the minimum and maximum response categories for each item. In this case, the
number of elements in {it:numlist} must be equal to the number of items times 2. By default, the minimum and maximum values are assumed to be the minimum and maximum for each item.
{marker impute_options}{...}
{phang}{opt imp:ute(method)} imputes missing items responses with Person Mean Substitution ({bf:pms}) or Two-way imputation method applied in each dimension ({bf:mi}). With PMS method, missing data are imputed only if the number of
missing values in the dimension is less than half the number of items in the dimension.
{phang2} By default, imputed values are rounded to the nearest whole number but with the {opt nor:ound} option, imputed values are not rounded. If {opt impute} is absent then {opt noround} is ignored.
{phang}{opt comp:score(method)} defines the method used to compute the scores. {it:method} may be either {bf:mean} (default), {bf:sum} or {bf:stand}(set scores from 0 to 100). {opt comp:score(method)} is ignored
if the {opt scores(varlist)} option is used.
{phang}{opt desc:items} displays a descriptive analysis of the items. This option displays missing data rate per item and distribution of item responses. It also computes for each item the Cronbach's alphas
obtained by omitting each item in each dimension. Moreover, the option computes Loevinger's Hj coefficients and the number of non-significant Hjk. See {help loevh} for details about Loevinger's coefficients.
{phang}{opt graph:s} displays graphs for items and dimensions descriptive analyses. It provides histograms of scores, a biplot of the scores and a graph showing the correlations between the items.
{marker cfa_options}{...}
{phang}{opt cfa} performs a Confirmatory Factor Analysis (CFA) using {help sem} command. It displays estimations of parameters and several goodness-of-fit indices.
{phang2} {opt cfam:ethod}({it:method}) specifies the method to estimate the parameters. {it:method} may be either {bf:ml} (maximum
likelihood), {bf:mlmv} ({bf:ml} with missing values) or {bf:adf} (asymptotic distribution free).
{phang2} {opt cfasb} produces Satorra-Bentler adjusted goodness-of-fit indices using the vce(sbentler) option from sem ({help sem_option_method##vcetype})
{phang2} {opt cfas:tand} displays standardized coefficients.
{phang2} {opt cfanocovd:im} asserts that the latent variables are not correlated.
{phang2} {opt cfac:ovs} option allows adding covariances between measurement errors. The syntax cfacov(item1*item2)
allows estimating the covariance between the errors of item1 and item3. To specify more than one covariance, the form of the syntax is cfacov(item1*item2 item3*item4).
{phang2} {opt cfar:msea(#)} option allows adding automatically the covariances between measurement errors found
with the estat mindices command until the RMSEA (Root Mean Square Error
of Approximation) of the model is less than #. More precisely, the "basic" model
(without covariances between measurement errors) is estimated then we add the covariance corresponding to the greatest modification index and the model is re-
estimated with this extra-parameter, and so on. The option only adds the covari-
ances between measurement errors within a dimension and can be combined with
cfacov. The specified value # may not be reached if all possible within-dimension
measurement errors have already been added.
{phang2} {opt cfacf:i(#)} option allows adding automatically the covariances between measurement errors found with
the estat mindices command until the CFI (Comparative Fit Index) of the model
is greater than #. More precisely, the "basic" model (without covariances between
measurement errors) is estimated then we add the covariance corresponding to the
greatest modification index and the model is re-estimated with this extra-parameter,
and so on. The option only adds the covariances between measurement errors within
a dimension and can be combined with cfacov. The specified value # may not
be reached if all possible within-dimension measurement errors have already been
added.
{phang2} {opt cfaor} option is useful when both {opt cfar:msea} and {opt cfacf:i} are used. By default, covariances between measurement errors are added and the model is estimated until both RMSEA
and CFI criteria are met. If cfaor is used, the estimations stop when one of the two
criteria is met.
{phang2} {opt *} options from {help sem_estimation_options} (e.g. {opt iterate(#)}, {opt vce(vcetype)}, etc.)
{marker convdiv_options}{...}
{phang}{opt conv:div} assesses convergent and divergent validities. The option displays the matrix of correlations between items and rest-scores. If {opt scores(varlist)} is used, then the correlations coefficients are computed between
items and scores of {opt scores(varlist)}.
{phang2} {opt tconv:div(#)} defines a threshold for highlighting some values. # is a real number between 0 and 1 which is equal to 0.4 by
default. Correlations between items and their own score are displayed
in red if it is less than #. Moreover, if an item has a smaller correlation coefficient with the score of its own dimension than the correlation coefficient computed with other scores, this coefficient is displayed
in red.
{phang2} {opt convdivb:oxplots} displays boxplots for assessing convergent and divergent validities. The boxes represent the correlation coefficients between the items of a given dimension and all scores. Thus the
box of correlation coefficients between items of a given dimension and the corresponding score must be higher than other boxes. There are as many boxplots as dimensions.
{marker reliability_options}{...}
{phang}{it:reliability_options} allow defining the thresholds for reliability and scalability indices.
{phang2} {opt a:lpha(#)} defines a threshold for Cronbach's alpha (see {help alpha}). # is a real number between 0 and 1 which is equal to 0.7
by default. Cronbach's alpha coefficients less than # are printed in red.
{phang2} {opt d:elta(#)} defines a threshold for Ferguson's delta coefficient (see {help delta}). Delta coefficients are computed only if {opt compscore}({it:sum}) is used
and {opt scores}({it:varlist)} is not used. # is a real number between 0 and 1 which is equal to 0.9
by default. Ferguson's delta coefficients less than # are printed in red.
{phang2} {opt h(#)} defines a threshold for Loevinger's H coefficient (see {help loevh}). # is a real number between 0 and 1 which is equal to
0.3 by default. Loevinger's H coefficients less than # are printed in red.
{phang2} {opt hj:min(#)} defines a threshold for Loevinger's Hj coefficients. The displayed value is the minimal Hj coefficient for a item in the dimension. (see {help loevh}). # is a real number between 0 and 1 which is equal to
0.3 by default. If the minimal Loevinger's Hj coefficient is less than # then it is printed in red and the corresponding item is displayed.
{marker repet_options}{...}
{phang}{opt rep:et(varlist)} assesses reproducibility of scores by defining in {it:varlist} the variables corresponding to responses at time 2 (in the same order than for time 1). Scores are computed according to
the {opt partition()} option. Intraclass
Correlation Coefficients (ICC) for scores and their 95% confidence interval are computed with Stata's {help icc} command.
{phang2} {opt kap:pa} computes kappa statistic for items with Stata's {help kap} command.
{phang2} {opt ickap:pa(#)} computes confidence intervals for kappa statistics using {help kapci}. # is the number of replications for bootstrap used to estimate confidence intervals if items are polytomous. If they are dichotomous, an analytical method is used. See {help kapci} for more details about
calculation of confidence intervals for kappa's coefficients. If the {opt kappa} option is absent then {opt ickappa(#)} is ignored.
{phang2} {opt scores2}({it:varlist}) allows selecting scores at time 2 from the dataset.
{phang}{opt kgv(varlist)} assesses known-groups validity according to the grouping variables defined in {it:varlist}. The option performs an ANOVA which compares the scores between groups of individuals, constructed with variables in {it:varlist}. A p-value based on a Kruskal-Wallis test is also given.
{marker kgv_options}{...}
{phang2} {opt kgvb:oxplots} draws boxplots of the scores split into groups of individuals.
{phang2} {opt kgvg:roupboxplots} groups all boxplots into one graph. If {opt kgvboxplots} is absent then the {opt kgvgroupboxplots} option is ignored.
{phang}{opt conc(varlist)} assesses concurrent validity with variables precised in {it:varlist}. These variables are scores from one or several other scales.
{marker conc_options}{...}
{phang2} {opt tc:onc(#)} defines a threshold for correlation coefficients between the computed scores and the scores of other scales defined in {it:varlist}. Correlation
coefficients greater than # (0.4 by default) are displayed in bold.
{marker examples}{...}
{title:Examples}
{phang2}{cmd:. validscale item1-item20, part(5 4 6 5)}{p_end}
{phang2}{cmd:. validscale item1-item20, part(5 4 6 5) imp graphs cfa cfastand cfacovs(item1*item3 item5*item7 item17*item18) convdiv convdivboxplots kgv(factor_variable) kgvboxplots conc(scoreA-scoreD)}{p_end}
{phang2}{cmd:. validscale item1-item20, part(5 4 6 5) imp scores(s1-s4) rep(item1bis-item20bis) scores2(s1bis-s4bis) kappa}{p_end}
{title:References}
{phang}Blanchette, D. 2010. LSTRFUN: Stata module to modify long local macros. {it:Statistical Software Components}, Boston College Department of Economics.
{phang}Gadelrab, H. 2010. {it:Evaluating the fit of structural equation models: Sensitivity to specification error and descriptive goodness-of-fit indices.} Lambert Academic Publishing.
{phang}Hamel, J.-F. 2014. MI TWOWAY: Stata module for computing scores on questionnaires containing missing item responses. {it:Statistical Software Components}, Boston College Department of Economics.
{phang}Hardouin, J.-B. 2004. LOEVH: Stata module to compute Guttman errors and Loevinger H coeficients. {it:Statistical Software Components}, Boston College Department of Economics.
{phang}Hardouin, J.-B. 2007. DELTA: Stata module to compute the Delta index of scale discrimination. {it:Statistical Software Components}, Boston College Department of Economics.
{phang}Hardouin, J.-B. 2013. IMPUTEITEMS: Stata module to impute missing data of binary items.
{phang}Hardouin, J.-B., A. Bonnaud-Antignac, V. Sbille, et al. 2011. Nonparametric item response theory using Stata. {it:Stata Journal} 11(1): 30.
{phang}Reichenheim, M. E. 2004. Confidence intervals for the kappa statistic. {it:Stata Journal} 4(4): 421{428(8).
{title:Author}
{phang}Bastien Perrot, EA 4275 SPHERE, "methodS in Patient-centered outomes and HEalth ResEarch", University of Nantes, France
{browse "mailto:bastien.perrot@univ-nantes.fr":bastien.perrot@univ-nantes.fr}{p_end}
{marker alsosee}{...}
{title:Also see}
{p 4 13 2}help for {help alpha}, {help delta}, {help loevh}, {help icc}, {help kapci}.{p_end}

File diff suppressed because it is too large Load Diff