File restructure #1
This commit is contained in:
.gitignoretélécharger les mises à jour SSC.doREADME.md
Modules/ado
personal
_
a
b
bidonc
calcscore.adocalcul.adocfa.adocheckfor2.adocheckfor2.hlpcheckvars.adocheckvars.hlpclv.adoclv.sthlpclv212.adoclv214.adoclv215.adoclv216.adoclv27.adoclv29.adocompart.adocompart2.adoconc.adoconvdiv.ado
d
dege.adodelta.adodescitems.adodescscale.adodescscalev1.1.adodescscalev1.adodetect.adodetect.hlpdetect2.adodropmissing.ado
e
files
Pop8204Dep.dtacantons.dtacommpct.dtacommunes.dtacommze.dtadccentre8002.dtadcfrance8002.dtanais8003.dtarpf829099.dtarph829099.dtarphf829099.dta
g
gammasym.adogammasym.hlpgausshermite.adogausshermite.hlpgausshermite1.adogausshermite2.adogausshermite3.adogeekel2d.adogeekel2d.hlpgeekel2d4.adogengroup.adogengroup.hlpgengutt.adogenscore.adogenscore.hlpguttmax.adoguttmax1.ado
grec
h
i
imputeitems - Copie.adoimputeitems v2.4.adoimputeitems.adoimputeitems.hlpimputeitems.txtimputeitems2.adoimputeitems_1.adoimputemok.adoimputemok.hlpimputerasch.adoimputerasch.hlpirtpoly.adoisvar.ado
k
l
loevH7.adoloevH72.adoloevH73.adoloevH73.hlploevHv1.hlploevh - Copie au 17 juin 2017.adoloevh v8.2.adoloevh.adoloevh.hlploevh8-1-3.adoloevh8.adoloevh81.adoloevh812.ziploevh813.adoloevh82.adolstrfun.ado
m
Multirsoort_indicefit.adomatrixlisthtml.adomdreplace.adomi_twoway.adomi_twoway.hlpmmsrm.adommsrm.hlpmmsrm2.adomsp.adomsp.hlpmsp66.adomsp66.hlpmsp82.ado
n
p
pcm - Copie.adopcm 3.4.adopcm 4.0.adopcm 4.1.adopcm 4.2 sauv le 8nov2019.adopcm 4.2.adopcm 5.1.adopcm 5.2.adopcm 5.3.adopcm 5.4.adopcm.adopcm.sthlppcm.zippcm21.adopcm22.adopcm23.adopcm3.2.adopcm3.3.adopcm3.adopcm44.adopcm5.adopcmodel.hlppcmodel.sthlppcmodel22.adopcmodel_v.adopcmodelplus.adopcmold.adopcmtest.adopcmtest.hlppcmtest.sthlppredraschwlm.ado
qualmosta
r
old
raschfit2.adoraschfit31.adoraschpower - Copie version SIM.adoraschpower1.5.adoraschpower1.adoraschpowerpcm.adoraschpowers.hlpraschtest2.adoraschtest82.adoraschtest83.adoraschtestv7732.adoraschtestv7761.adoraschtestv7762.adoraschtestv78 avant COVARIABLES.adoraschtestv782.adoraschtestv785.adoraschtestv7jf.adorsoort.dorsoort1 (2).adorsoort1.ado
raschfit.adoraschfit.hlpraschlong.adoraschlongitudinal2.adoraschpce.adoraschpower.adoraschpower.hlpraschpower33.adoraschpower4.adoraschpower5.adoraschpower51.adoraschpower511.adoraschpower52.adoraschpower53.adoraschpower54.adoraschpower55.adoraschpower56.adoraschpower58.adoraschpower59.adoraschres.adoraschres.hlpraschtest v8.10.1.adoraschtest.adoraschtest.hlpraschtestv7.adoraschtestv7.hlpraschtestv787.adoraschtestv7v8.10.1.adoraschtestv7v8.10.adoraschtestv7v88.adoraschtestv8.10.adoraschtestv86.adorel.adorepet.adorosali.adorosali.sthlprosali22.adorosali22.sthlprosali23.adorsbynpirt.adorsoort.adorsoort.hlprsoort11.ziprsoort12.adorsoort13.adorsoortBP.ados
old
sascfa.adosenspescore.adosf36fr v1.6.adosf36fr v1.7.adosf36fr.adosf36fr.hlpsf36fr.zipsf36fr1.4.adosf36fr1.5.adosf36frv13.adosimirt - Copie.adosimirt v4.1.adosimirt v4.2.adosimirt v4.3.adosimirt v4.4.adosimirt.adosimirt.hlpsimirt.zipt
tcm.adotestclv.adotodate.adotorumm.adotosas.adotraces v4.adotraces v5 avec items numeric ne marche pas - Copie.adotraces.adotraces.hlptraces3.adotraces32.adotraces33.adotri.adotrouve.ado
v
valid.adovalid.dlgvalid.hlpvalidscale.adovalidscale.ado (old)validscale.dlgvalidscale.hlpvalidscale.sthlpvalidscaleXX.ado
w
zip
backrasch2.zipclv214.zipdetect31.zipgammasym.zipgammasym22.zipgausshermite1.zipgeekel2d43.zipgengroup12.ziphcavar32.zipimputeitems.zipimputeitems24.zipimputemok21.zipimputerasch2.ziploevH.ziploevh8.zipmmsrm4.zipmohand.zipmsp.zipmsp81.zipnpirt.zipraschfit4.zipraschpower1.4.zipraschpower1.5.zipraschpower1.zipraschpower2.zipraschpower32.zipraschtest.zipraschtest8.zipraschtest86.zipraschtest87.zipraschtestv7.zipsf36fr13.zipsimirt.zipsimirt34.zipsimirt35.ziptraces33.zip
plus
_
_eststo.ado_eststo.hlp_get_mlogit_bv.ado_get_mlogit_bvecv.ado_peabbv.ado_pebase.ado_pebase.hlp_pecats.ado_pecats.hlp_peciboot.ado_peciboot.hlp_pecidelta.ado_pecidelta.hlp_peciml.ado_pecmdcheck.ado_pecollect.ado_pecollect.hlp_pedum.ado_pedum.hlp_peife.ado_peife.hlp_pemarg.ado_pemarg.hlp_penocon.ado_penocon.hlp_pepred.ado_pepred.hlp_perhs.ado_perhs.hlp_pesum.ado_pesum.hlp_petrap.ado_petrap.hlp_peunvec.ado_peunvec.hlp_pexstring.ado
a
b
bagroup.adobagroup.hlpbamat.adobamat.hlpbaplot.adobaplot.hlpbatplot.adobatplot.hlpbinolist.adobinolist.hlpblandaltman.adobollenstine.adobollenstine.sthlpbothlist.adobothlist.hlpbrant.adobrant.hlp
backup.trkc
caplog.adocaplog.hlpcase2alt.adocase2alt.hlpcfa1.adocfa1.hlpcfa1_lf.adocheckfor2.adocheckfor2.hlpchoplist.adochoplist.hlpcmdchk.adocollist.adocollist.hlpconcord.adoconcord.dlgconcord.hlpconfa.adoconfa.mataconfa.sthlpconfa_estat.adoconfa_estat.sthlpconfa_lf.adoconfa_lfm.adoconfa_p.adoconfirmdir.adoconfirmdir.hlpconvlist.adoconvlist.hlpcountfit.adocountfit.hlpcseplist.adocseplist.hlpcvarlist.adocvarlist.hlp
d
dellist.adodellist.hlpdelta.adodelta.hlpdifflist.adodifflist.hlpdiscrim2.adodiscrim2.hlpdropvars.adodropvars.hlp
e
elapse.adoelapse.hlpeq_g.hlpeqlist.adoeqlist.hlpespoisson.adoespoisson.hlpespoisson_ll.adoespoisson_p.adoestadd.adoestadd.hlpestout.adoestout.hlpestpost.adoestpost.hlpeststo.adoeststo.hlpesttab.adoesttab.hlpexspoisson.adoexspoisson_ll.adoexspoisson_p.ado
f
g
galbr.adogalbr.dlggalbr.hlpghquad.adoghquadm.adoghquadm.hlpgllam_ll.adogllamm.adogllamm.hlpgllapred.adogllapred.hlpgllarob.adogllas_yu.adogllasim.adogllasim.hlp
h
i
i2ci.adoicc23.adoicc23.hlpiccconf.adoiccconf.hlpice.adoice.hlpiclassr.adoiclassr.hlpiclassr2.adoiclassr2.hlpimputeitems.adoimputeitems.hlpinslist.adoinslist.hlpisvar.adoisvar.hlp
j
l
l1way.adol1way.hlplabbe.adolabbe.dlglabbe.hlplclist.adolclist.hlplconfa.mlibleastlikely.adoleastlikely.hlplistblck.adolistblck.hlplistcoef.adolistcoef.hlplistutil.hlplog2html.adolog2html.hlplog2html7.adolog2html7.hlplogout.adologout.hlp
m
maplist.adomaplist.hlpmeta.dlgmeta_dialog.hlpmetabias.adometabias.dlgmetabias.hlpmetacum.dlgmetafunnel.adometafunnel.dlgmetafunnel.hlpmetainf.adometainf.dlgmetainf.hlpmetan.adometan.dlgmetan.hlpmetan7.adometan7.dlgmetan7.hlpmetan_examples.adometaninf.adometaninf.dlgmetaninf.hlpmetannt.adometannt.dlgmetannt.hlpmetap.dlgmetareg.adometareg.dlgmetareg.hlpmetareg_ll.adometareg_p.adometareg_pm.adometatrim.dlgmhplot.adomicombine.adomicombine.hlpmijoin.adomijoin.hlpmisplit.adomisplit.hlpmisschk.adomisschk.sthlpmlogplot.adomlogplot.hlpmlogtest.adomlogtest.sthlpmlogview.adomlogview.hlpmnthlist.adomnthlist.hlpmvtab1.adomvtab1.hlp
n
nct.adonct.hlpnct2.adonct2.hlpnct2inv.adonct2inv.hlpnctinv.adonctinv.hlpnctn.adonctn.hlpnctncp.adonctncp.hlpnctprob.adonctprob.hlpnicenum.adonmlab.adonmlab.hlp
o
p
polych_ll.adopolychoric.adopolychoric.hlppolychoric.zippolychoricpca.adopolychoricpca.hlppolychoricpca.zippolyser_ll.adoposlist.adoposlist.hlppostlist.adopostlist.hlppraccum.adopraccum.hlpprchange.adoprchange.hlpprcounts.adoprcounts.hlpprdc.adoprdc.hlpprelist.adoprelist.hlpprgen.adoprgen.hlpprodlist.adoprodlist.hlpprtab.adoprtab.hlpprvalue.adoprvalue.hlpprwhich.ado
r
remcor.adoreop_ll.adoreopc_ll.adoreoprob.adoreoprob.hlpreplist.adoreplist.hlprevlist.adorevlist.hlprfpr_ll1.adorfprobit.adorfprobit.hlprotlist.adorotlist.hlp
s
sasexe.adosaswrapper.adosaswrapper.hlpsavasas.adosavasas.hlpsavastata.sassdpair.adosdpair.hlpseeout.adoseeout.hlpsellist.adosellist.hlpseqlist.adoseqlist.hlpshellout.adoshellout.hlpshortdir.adoshortdir.hlpsjlatex.adosjlatex.hlpsjlog.adosjlog.hlpsjlog_7.adosortlist.adosortlist.hlpspex.adospex.hlpspost.hlpspost_footer.ihlpspostupdate.adosublist.adosublist.hlpsumlist.adosumlist.hlp
stata.trkt
takelist.adotakelist.hlptmpdir.adotmpdir.hlptorumm.adotorumm.hlptraces.adotraces.hlptraj.adotraj.hlptraj.plugintrajplot.adotrajplot.hlptrnclist.adotrnclist.hlp
u
v
w
x
@ -1,291 +0,0 @@
|
||||
program define compart,rclass
|
||||
version 8
|
||||
syntax varlist [if] [in] [fweight iweight] [,part(numlist) Matrix(string) type(string) DETails noSTANDardized VARiables SQUare]
|
||||
|
||||
preserve
|
||||
unab varlist:`varlist'
|
||||
di "`varlist'"
|
||||
tokenize `varlist'
|
||||
marksample touse
|
||||
local nbvar:word count `varlist'
|
||||
qui count
|
||||
local nbind=r(N)
|
||||
tempname p
|
||||
qui gen `p'=1
|
||||
qui su `p' [`weight'`exp'] if `touse'
|
||||
local nbind=r(N)
|
||||
if "`square'"=="" {
|
||||
local quad=1
|
||||
}
|
||||
else {
|
||||
local quad=2
|
||||
}
|
||||
|
||||
if "`type'"!=""&"`type'"!="polychoric" {
|
||||
di in red "The type of the matrix is not authorized. Please correct your {hi:type} option."
|
||||
error 198
|
||||
}
|
||||
if "`type'"!=""&"`matrix'"!="" {
|
||||
di in red "You cannot define in the same time the {hi:type} and the {hi:matrix} options"
|
||||
error 198
|
||||
}
|
||||
|
||||
/* DEFINITION OF THE PARTITION OF THE VARIABLES*/
|
||||
|
||||
local newpart
|
||||
foreach i in `part' {
|
||||
if `i'!=0 {
|
||||
local newpart `newpart' `i'
|
||||
}
|
||||
}
|
||||
local part `newpart'
|
||||
local meme=0
|
||||
local diff=0
|
||||
local nbpart:word count `part'
|
||||
forvalues i=1/`nbpart' {
|
||||
local iti:word `i' of `part'
|
||||
local meme=`meme'+`iti'*(`iti'-1)/2
|
||||
forvalues j=`=`i'+1'/`nbpart' {
|
||||
local itj:word `j' of `part'
|
||||
local diff=`diff'+`iti'*`itj'
|
||||
}
|
||||
}
|
||||
|
||||
local perc=`meme'/(`meme'+`diff')
|
||||
di "meme: `meme' ; diff: `diff' ; perc: `perc'"
|
||||
|
||||
|
||||
local test=0
|
||||
local last0=0
|
||||
forvalues i=1/`nbpart' {
|
||||
local first`i'=`last`=`i'-1''+1
|
||||
local size`i':word `i' of `part'
|
||||
local last`i'=`first`i''+`size`i''-1
|
||||
local test=`test'+`size`i''
|
||||
local list`i'
|
||||
forvalues j=`first`i''/`last`i'' {
|
||||
local list`i' `list`i'' ``j''
|
||||
}
|
||||
}
|
||||
if `test'!=`nbvar' {
|
||||
di in red "{p}The described partition of the variables is composed of a number of variables different of the number of variables of varlist.{p_end}"
|
||||
exit 198
|
||||
}
|
||||
|
||||
/* BY DEFAULT, STANDARDIZATION*/
|
||||
if "`standardized'"=="" {
|
||||
forvalues i=1/`nbvar' {
|
||||
qui su ``i'' [`weight'`exp']
|
||||
qui replace ``i''=(``i''-r(mean))/r(sd)
|
||||
}
|
||||
}
|
||||
|
||||
tempname Cov W
|
||||
if "`matrix'"==""&"`type'"!="polychoric" {
|
||||
/* COVARIANCE OR CORRELATION MATRIX*/
|
||||
qui matrix accum `Cov'=`varlist' [`weight'`exp'],nocons dev
|
||||
qui matrix `Cov'=`Cov'/(`nbind'-1)
|
||||
}
|
||||
else if "`type'"=="polychoric" {
|
||||
qui polychoric `varlist'
|
||||
qui matrix `Cov'=r(R)
|
||||
}
|
||||
else {
|
||||
qui matrix `Cov'=`matrix'
|
||||
}
|
||||
/* WE SAVE THE MATRIX AND WE COMPUTE THE AVERAGE COVARIANCE */
|
||||
qui matrix `W'=`Cov'
|
||||
local sum=0
|
||||
forvalues i=1/`nbvar' {
|
||||
forvalues j=`=`i'+1'/`nbvar' {
|
||||
local sum=`sum'+ `W'[`i',`j']^`quad'
|
||||
}
|
||||
}
|
||||
|
||||
/* WE SAVE THE DATA AND WE COMPUTES THE USED PERCENTILES OF THE COVARIANCE*/
|
||||
|
||||
tempfile compartfile
|
||||
qui save `compartfile',replace
|
||||
|
||||
drop _all
|
||||
set obs `=`nbvar'*(`nbvar'-1)'
|
||||
local n=1
|
||||
qui gen i=.
|
||||
qui gen j=.
|
||||
qui gen corr=.
|
||||
forvalues i=1/`nbvar' {
|
||||
forvalues j=`=`i'+1'/`nbvar' {
|
||||
qui replace i=`i' in `n'
|
||||
qui replace j=`j' in `n'
|
||||
qui replace corr=`W'[`i',`j']^`quad' in `n'
|
||||
local ++n
|
||||
}
|
||||
}
|
||||
matrix list `W'
|
||||
su corr
|
||||
sort corr
|
||||
centile corr,centile(`=100-`perc'*100')
|
||||
local centile=r(c_1)
|
||||
if `diff'!=0 {
|
||||
local perc2=(`meme'+1)/(`meme'+`diff')
|
||||
centile corr,centile(`=100-`perc2'*100')
|
||||
local centile2=r(c_1)
|
||||
local centile=(`centile'+`centile2')/2
|
||||
}
|
||||
qui use `compartfile',clear
|
||||
|
||||
/***************************************************/
|
||||
|
||||
if `nbpart'==1 {
|
||||
local mean=0
|
||||
* local mean=(2*`sum')/(`nbvar'*(`nbvar'-1))
|
||||
}
|
||||
else {
|
||||
local mean=(2*`sum')/(`nbvar'*(`nbvar'-1))
|
||||
local mean=0
|
||||
*local mean=`centile'
|
||||
}
|
||||
|
||||
/*THE MATRIX IS CENTERED*/
|
||||
|
||||
forvalues i=1/`nbvar' {
|
||||
matrix `W'[`i',`i']=0
|
||||
forvalues j=`=`i'+1'/`nbvar' {
|
||||
matrix `W'[`i',`j']=(`W'[`i',`j']^`quad'-`mean')
|
||||
matrix `W'[`j',`i']=`W'[`i',`j']
|
||||
}
|
||||
}
|
||||
|
||||
/*WE COMPUTE THE INDEX D*/
|
||||
local C=0
|
||||
local C1=0
|
||||
local C2=0
|
||||
local minrho=2
|
||||
local summeme=0
|
||||
local sumdiff=0
|
||||
if "`square'"!="" {
|
||||
local maxrho=0
|
||||
}
|
||||
else {
|
||||
local maxrho=-2
|
||||
}
|
||||
*set trace on
|
||||
forvalues i=1/`nbpart' {
|
||||
forvalues j=1/`nbpart' {
|
||||
forvalues k=`first`i''/`last`i'' {
|
||||
forvalues l=`first`j''/`last`j'' {
|
||||
if `i'!=`j' {
|
||||
if `k'>`l' {
|
||||
local sumdiff=`sumdiff'+`Cov'[`k',`l']
|
||||
}
|
||||
if (`Cov'[`k',`l'])^`quad'>(`maxrho')^`quad' {
|
||||
local maxrho=(`Cov'[`k',`l'])
|
||||
}
|
||||
matrix `W'[`k',`l']=-(`W'[`k',`l'])
|
||||
}
|
||||
else if (`Cov'[`k',`l'])^`quad'<(`minrho')^`quad'&`k'!=`l' {
|
||||
local minrho=`Cov'[`k',`l']
|
||||
}
|
||||
if `i'==`j'&`k'>`l' {
|
||||
local summeme=`summeme'+`Cov'[`k',`l']
|
||||
}
|
||||
local C=`C'+`W'[`k',`l']
|
||||
local C1=`C1'+abs(`W'[`k',`l'])
|
||||
if `W'[`k',`l']>+0 {
|
||||
local ++C2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if `meme'!=0 {
|
||||
local summeme=`summeme'/`meme'
|
||||
}
|
||||
if `diff'!=0 {
|
||||
local sumdiff=`sumdiff'/`diff'
|
||||
}
|
||||
local diffsum=`summeme'-`sumdiff'
|
||||
set trace off
|
||||
di "Summeme: `summeme' ; Sumdiff: `sumdiff'"
|
||||
|
||||
local minrho=(`minrho')^(`quad')
|
||||
local maxrho=(`maxrho')^(`quad')
|
||||
|
||||
local C=sign(`C')*(abs(`C'))^(1/`quad')/(`nbvar'*(`nbvar'-1))+`mean'
|
||||
local C1=(`C1')^(1/`quad')/(`nbvar'*(`nbvar'-1))
|
||||
local C2=(`C2')/(`nbvar'*(`nbvar'-1))*100
|
||||
return local Pcov=`=`C'/`C1''
|
||||
return local Pel=`=`C2'/100'
|
||||
|
||||
if `nbpart'==1 {
|
||||
local C=`C'*(`nbvar'+1)/`nbvar'
|
||||
}
|
||||
|
||||
*di "C:" `C' " C1: " `C1' " C2: " `C2'
|
||||
if `nbpart'==1 {
|
||||
local maxrho=0
|
||||
}
|
||||
if `nbpart'==`nbvar' {
|
||||
local minrho=0
|
||||
}
|
||||
di " C=(`meme'*`minrho'-`diff'*`maxrho')/(`meme'+`diff')"
|
||||
local C=(`meme'*`minrho'-`diff'*`maxrho')/(`meme'+`diff')
|
||||
di in green "{hline 80}"
|
||||
di in green "Number of individuals: " _col(71) in ye %8.0f `nbind'
|
||||
di in green "Number of variables: " _col(71) in ye %8.0f `nbvar'
|
||||
di in green "COMPART index: " _col(71) in ye %8.6f `C'
|
||||
di in green "Proportion of the covariances explained by the COMPART index: " _col(73) in ye %6.2f `=abs(`C')/`C1'*100' "%"
|
||||
di in green "Proportion of positive elements in the matrix: " _col(73) in ye %6.2f `C2' "%"
|
||||
di in green "Minimum correlation coefficient for 2 variables of the same group: " _col(74) in ye %5.2f `minrho'
|
||||
di in green "Maximum correlation coefficient for 2 variables of two different groups: " _col(74) in ye %5.2f `maxrho'
|
||||
di in green "Average correlation coefficient: " _col(74) in ye %5.2f `mean'
|
||||
di in green "{hline 80}"
|
||||
di
|
||||
if "`details'"!="" {
|
||||
di in green "Matrix of the coefficients"
|
||||
di in green "{hline 26}"
|
||||
matrix list `W' ,noheader format(%7.4f)
|
||||
di
|
||||
}
|
||||
if "`variables'"!="" {
|
||||
di in green "Details for each variable"
|
||||
di in green "{hline 26}"
|
||||
di
|
||||
di in green "{hline 80}"
|
||||
di in green "Items" _col(17) "COMPART" _col(26) "Problematic items"
|
||||
di in green "{hline 80}"
|
||||
tempname Cvar
|
||||
matrix `Cvar'=J(1,`nbvar',0)
|
||||
forvalues i=1/`nbvar' {
|
||||
local C`i'=0
|
||||
local pourri`i'
|
||||
forvalues j=1/`nbvar' {
|
||||
local C`i'=`C`i''+`W'[`i',`j']
|
||||
if `W'[`i',`j']<0 {
|
||||
local pourri`i' `pourri`i'' ``j''
|
||||
}
|
||||
}
|
||||
local C`i'=`C`i''/(`nbvar'-1)
|
||||
matrix `Cvar'[1,`i']=`C`i''
|
||||
di in ye abbrev("``i''",14) _col(15) %9.6f `C`i'' _c
|
||||
if "`pourri`i''"!="" {
|
||||
di in ye _col(26) "`pourri`i''"
|
||||
}
|
||||
else {
|
||||
di
|
||||
}
|
||||
}
|
||||
di in green "{hline 80}"
|
||||
matrix colnames `Cvar'=`varlist'
|
||||
matrix rownames `Cvar'=Compart
|
||||
return matrix Cvar=`Cvar'
|
||||
}
|
||||
local test=`maxrho'-`minrho'
|
||||
local diffsum=(`summeme'*`meme'-`diff'*`sumdiff')/(`meme'+`diff')
|
||||
local diffsum=`summeme'/*-`sumdiff'*/
|
||||
return local compart `C'
|
||||
return local mean `mean'
|
||||
return local list `varlist'
|
||||
return local part `part'
|
||||
restore
|
||||
end
|
Reference in New Issue
Block a user