java.lang.Object
org.gsusers.gsmv.model.SampleSizeTree
Class SampleSizeTree
The SampleSizeTree object contains the whole structure of the sample
sizes for both crossed and nested facets, as well management of indices,
incrementing indices (stepping), and calculation of range for each
configuration ('Effect').
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSampleSizeTree(Nest _nest, gsLogger _logger, Preferences _prefs) Constructor forSampleSizeTree -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSampleSize(char _c, String[] sss) This method runs when sample sizes are entered.voidaddSampleSize(int _iFacet, int[] sss) This method runs when sample sizes are entered.voidutility for setting up Sample Size Pagevoidcompletes sizeArray offsets from size arrayvoidvoidutility converts Factor string array lists to string arraysvoidsetter of 'doOver' flag (use script)dumpArray(int[] array) utility to convert int array to text stringgetConfiguration(int _iConfig) getter of Effects, both primary (per Facet) and cross-interactions.intgetter of Effect count (primary and cross-interactions).intgetCount(int iConf) getter of current state in 'Effect'.intgetDepth(char cF) Getter of iarDepth by facet characterintgetDepth(int _iC) getter ofiarDepthby "Effect' pointer.getter of Facet dictionary in original orderintgetDim(char _c) total number of states per Facet (Analysis)getter of 'Effect Size', i.e.getFacet(char _c) getter of Facet by designation char.getHarmonic(Integer _iFacet) Harmonic mean of sample sizes per Facet in nested context, according to Brennan for calculation of G coefficients.intgetHIndex(char c) getter of Facet indices by Facet designation char (the order in which the Facet indices step through the score data file)int[]returns sample size array according to the position of the Facet in the hierarchic orderint[]getter of sample size sums per Facet by position in hierarchic order for Analysis.current Facet index in nested environmentint[]getter of all Facet indicesArithmetic mean of sample size per Facet in nested context, according to Brennan for calculation of G coefficients.intgetMaxSum(char _cF) Total number of states for Facet cFgetNest(char _c) getter of primary nested configuration of Facets (as in script).intgetOffset(char _cFacet, int _iPointer) getter of index offset in nested Facets resulting from the 'Nestor's' index.int[]returns sample size array according to the position of the Facet in the original orderint[]getter of sample size sums per Facet by position in original order for Analysis.javafx.scene.layout.VBoxcomposes JavaFX code page (vBoxto collect sample sizes for a nested Facet.voidgetSamples(char _cFacet) intializesFacetintgetSize(int iConf) getter of maximal state count of 'Effect' as product ofFactors.int[]getSizes(char c) returns sample size array by Facet designation charint[]getSums(char c) getter of sample size sums per Facet by Facet designation char for Analysis.voidhasChanged(Integer _iLevel, Integer _iPointer, Integer _value) updater of sample size arrays accumulationsintiGetRepFactor(char _cReplicate) Calculates the number of fixed scores presenting for each replicationIncrementer for simulation for each call the Facet indices get incremented according to the nesting order, such that the count of the last Effect goes up by one count.voidinitializes the variables used for stepping (incrementing) through Facet indices.getter of total score count.static Stringvoidreset all Facet indices and iarCurrentIndexSet.utility to format string array for text output.voidEstablishes the structural arrays.voidsetAsterisk(char _cAsterisk) sets the char for the starred FacetvoidsetConfigurations(String[] _sarConfigs) 1D String array with syntax od designvoidsetCrossed(char _c, Boolean _bCrossed) Setter forFacet'bCrossed' status (vs bNested).voidcalculates total number of possible states for each FacetvoidsetDepths(int[] _iarDepths) Setter of facet number of statesvoidsetDictionary(String _sDictionary) setter for sDictionaryvoidsetFacetCount(int _iFacetCount) setter of FacetCount and indices array establishment.voidSetter for facet array.voidsetHDictionary(String _sHDictionary) setter for sHDictionaryvoidsetHIndex(char c, int iIndex) setter of Facet indices by Facet designation char (the order in which the Facet indices step through the score data file)voidassign appropriate array of primary nests tosarNestsvoidsetProducts(String[][] _sarProducts) Setter for 2D String array containing project designcumulative sample size per Facet.
-
Constructor Details
-
SampleSizeTree
Constructor forSampleSizeTree- Parameters:
_nest- pointer toNest_logger- pointer to org.gs_users.gs_lv.GS_Application logger_prefs- pointer toPreferences
-
-
Method Details
-
setDictionary
setter for sDictionary- Parameters:
_sDictionary- String of all Facet designation chars in original order.
-
setHDictionary
setter for sHDictionary- Parameters:
_sHDictionary- String of all Facet designation chars in hierarchic order.
-
addSampleSize
public void addSampleSize(int _iFacet, int[] sss) This method runs when sample sizes are entered. sums and cumuls are calculated when a facet is added by facet number (original).- Parameters:
_iFacet- basic index to facetsss- array of integer sample sizes for a specifies facet
-
addSampleSize
This method runs when sample sizes are entered. sums and cumuls are calculated when a facet is added by facet Designation char.- Parameters:
_c- Facet char designationsss- string array of sample sizes as text
-
setCrossed
Setter forFacet'bCrossed' status (vs bNested).- Parameters:
_c- Facet designation char_bCrossed- flag that Facet is crossed (vs nested)
-
setNests
assign appropriate array of primary nests tosarNests- Parameters:
_sarNested- external string array
-
getPage
composes JavaFX code page (vBoxto collect sample sizes for a nested Facet.- Parameters:
_iSample- index to nested Facet (corresponds to order in script)- Returns:
- vBox
-
getSamples
public void getSamples(char _cFacet) intializesFacet- Parameters:
_cFacet- facet designation char
-
getEffect
getter of 'Effect Size', i.e. the sample sizes for a Facet according of its 'Nestor', if any. 'Crossed' Facets only have one sample size.- Parameters:
iRow- Facet position in original order.- Returns:
- String containing one or more sample size values
-
getNest
getter of primary nested configuration of Facets (as in script).- Parameters:
_c- Facet designation char- Returns:
- nested configuration of Facet
-
padRight
- Parameters:
s- original textn- number of spaces to pad- Returns:
- padded text
-
hasChanged
updater of sample size arrays accumulations- Parameters:
_iLevel- Facet position in original order_iPointer- pointer to each of the individual sample sizes for this Facet_value- actual value of the sample size
-
DoOver
setter of 'doOver' flag (use script)- Parameters:
_bDoOver- boolean flag
-
numRecords
getter of total score count.- Returns:
- iRecordCount total number of scores
-
getIndex
current Facet index in nested environment- Parameters:
_iFacet- integer facet pointer (original order)_iPointer- offset according to 'Nestor'- Returns:
- Facet index
-
size
cumulative sample size per Facet.- Parameters:
_iPointer- Facet as Integer in original order- Returns:
- total sample size for Facet
-
getSizes
public int[] getSizes(char c) returns sample size array by Facet designation char- Parameters:
c- Facet designation char- Returns:
- sample size array
-
getOSizes
returns sample size array according to the position of the Facet in the original order- Parameters:
iOrder- position of Facet in original order- Returns:
- sample size array
-
getHSizes
returns sample size array according to the position of the Facet in the hierarchic order- Parameters:
iHOrd- Facet position in hierarchic order- Returns:
- sample size array
-
getSums
public int[] getSums(char c) getter of sample size sums per Facet by Facet designation char for Analysis.- Parameters:
c- Facet designation char- Returns:
- cumulative sample size per Facet
-
getMaxSum
public int getMaxSum(char _cF) Total number of states for Facet cF- Parameters:
_cF- designation char for facet- Returns:
- total number of possible states for facet
-
getOSums
getter of sample size sums per Facet by position in original order for Analysis.- Parameters:
_iOrd- Facet position in original order- Returns:
- cumulative sample size per Facet
-
getHSums
getter of sample size sums per Facet by position in hierarchic order for Analysis.- Parameters:
_iHOrd- Facet position in hierarchic order- Returns:
- cumulative sample size per Facet
-
getLevel
Arithmetic mean of sample size per Facet in nested context, according to Brennan for calculation of G coefficients.- Parameters:
_iFacet- position of Facet in original order- Returns:
- arithmetic mean of Sample Size per Facet
-
getHarmonic
Harmonic mean of sample sizes per Facet in nested context, according to Brennan for calculation of G coefficients.- Parameters:
_iFacet- position of Facet in original order- Returns:
- harmonic mean of Sample Size per Facet
-
collectSampleSizes
public void collectSampleSizes()utility for setting up Sample Size Page -
setAsterisk
public void setAsterisk(char _cAsterisk) sets the char for the starred Facet- Parameters:
_cAsterisk- char of Facet carrying Asterisk
-
increment
Incrementer for simulation for each call the Facet indices get incremented according to the nesting order, such that the count of the last Effect goes up by one count. The 'Effect' corresponding to the residual variance component gets split into its factors. The indices are then incremented separately for each factor in the appropriate order by the recursive method 'bClimb'.- Returns:
falsewhen all Facet indices have reached their maximum,trueotherwise
-
getHIndex
public int getHIndex(char c) getter of Facet indices by Facet designation char (the order in which the Facet indices step through the score data file)- Parameters:
c- Facet designation char- Returns:
- Facet index for that Facet
-
setHIndex
public void setHIndex(char c, int iIndex) setter of Facet indices by Facet designation char (the order in which the Facet indices step through the score data file)- Parameters:
c- Facet designation chariIndex- Facet index for that Facet
-
resetIndices
public void resetIndices()reset all Facet indices and iarCurrentIndexSet. -
getIndices
public int[] getIndices()getter of all Facet indices- Returns:
- int array of Facet indices
-
setFacetCount
public void setFacetCount(int _iFacetCount) setter of FacetCount and indices array establishment.- Parameters:
_iFacetCount- number of facets
-
getConfiguration
getter of Effects, both primary (per Facet) and cross-interactions.- Parameters:
_iConfig- index of Effect- Returns:
- Effect string (ordered, nested Facet chars)
-
setConfigurations
1D String array with syntax od design- Parameters:
_sarConfigs- design syntax
-
setProducts
Setter for 2D String array containing project design- Parameters:
_sarProducts- 2D String array containing project design
-
sDump
utility to format string array for text output.- Parameters:
sar- generic String array- Returns:
- formatted text String
-
getConfigurationCount
public int getConfigurationCount()getter of Effect count (primary and cross-interactions).- Returns:
- int count
-
initCounter
public void initCounter()initializes the variables used for stepping (incrementing) through Facet indices. -
getFacet
getter of Facet by designation char.- Parameters:
_c- Facet designation char- Returns:
- Facet corresponding to _c
-
consolidateSplits
public void consolidateSplits()utility converts Factor string array lists to string arrays -
getCount
public int getCount(int iConf) getter of current state in 'Effect'.- Parameters:
iConf- pointer to 'Effect'- Returns:
- int current state of 'Effect', less than
iarDepth
-
getSize
public int getSize(int iConf) getter of maximal state count of 'Effect' as product ofFactors.- Parameters:
iConf- int pointer to 'Effect'- Returns:
- int maximal number of states for an 'Effect', when Facet indices go through all combinations.
-
getOffset
public int getOffset(char _cFacet, int _iPointer) getter of index offset in nested Facets resulting from the 'Nestor's' index.- Parameters:
_cFacet- Facet designation char_iPointer- index of 'Nestor'- Returns:
- sum of sample sizes less than iPointer
-
getDictionary
getter of Facet dictionary in original order- Returns:
- sDictionary String
-
getDim
public int getDim(char _c) total number of states per Facet (Analysis)- Parameters:
_c- Facet designation char- Returns:
- total number of states
-
getDepth
public int getDepth(int _iC) getter ofiarDepthby "Effect' pointer.- Parameters:
_iC- pointer to 'Effect' (Configuration)- Returns:
- int maximal number of states per 'Effect'
-
getDepth
public int getDepth(char cF) Getter of iarDepth by facet character- Parameters:
cF- char of 'Effect' facet- Returns:
- int maximal number of states per 'Effect'
-
setDepths
public void setDepths()calculates total number of possible states for each Facet -
setDepths
public void setDepths(int[] _iarDepths) Setter of facet number of states- Parameters:
_iarDepths- facet number of states
-
completeOffsets
public void completeOffsets()completes sizeArray offsets from size array -
setFacets
Setter for facet array.- Parameters:
_farFacets- facet array
-
setArrays
Establishes the structural arrays.- Parameters:
_sDictionary- string of facets
-
iGetRepFactor
public int iGetRepFactor(char _cReplicate) Calculates the number of fixed scores presenting for each replication- Parameters:
_cReplicate- designation of replicating facet- Returns:
- number of fixed scores per replication
-
dumpArray
utility to convert int array to text string- Parameters:
array- arbitrary int array- Returns:
- formatted text
-
completeSSS
public void completeSSS()
-