Date: 2018/11 

Add-in Type: Group, Series, Svector

Default Proc Name: groupstatby

Description: 
Computes by-statistics for all series contained in a group or as listed in an svector, or of a single series, for each combination of classifier values 
and provides the statistics in a table as output in the group's own window.

Usage: 
(Note: "{x/y/..}" denotes two or more alternatives of providing paramters or options. Elements in brackets "[...]" denote optional elements)

object.groupstatby ?/help
    Shows this help text

object.groupstatby([{s/stat}=statistics[, {sa/smpl/sample}=sample, corout={t/tab/table/m/mat/matrix}, {f/form/format}=integer, {t/trans/transpose}, {tab/table}=string]) classifier
{s/stat}: statistics, string, one of the following univariate statistics:
    sum: sums
    mean: means (default)
    min: minima
    max: maxima
    kur: kurtosis
    med, median: median
    skew: skewness
    std: standard deviation
    na: number of NAs
    std: standard deviations
    count: number of observations 
    quant={arg} quantile with value given by the argument {arg}, default=.5
   or one of the following bivariate statistics:
    cor: pairwise pearson correlation coefficients
    cov: pairwise covariances 
    sscp: pairwise sum of squares of cross products
    rcor: pairwise Spearman rank-correlation coefficients
    rcov: pairwise Spearman rank-covariances 
    rsscp: pairwise Spearman rank sum of squares of cross products
    ucor: pairwise product moment correlation coefficients
    ucov: pairwise product moment covariances 
    usscp: pairwise product moment sum of squares of cross products

sa/smpl/sample: string, sample for which to compute the by-group statistics 
	default: current pagesample
	
classifier: by-group series or an object (text, svector, string, group) which lists the names of the by-groupseries

corout: string, one of (t, tab, table, m, mat, matrix), denoting the type of output for bivariate statistics (like cor, rcor, etc). 
The default is "table" except if the number of series or seriesnames in [object] exceeds 3, when the default becomes "matrix".

f/form/format: integer, number of digits in numerical output. Default: 6

t/trans/transpose: option, transposes the output if set (i.e., classifiers in columns, variables in rows). 
	This option has no effect for bivariate statistics if the option corout=matrix is set 

tab/table: string, specifying the name of the table object to save (freeze) the output to 

Examples:
    group1.groupstatby  country
	Shows means of the series contained in the group group1 by country, using the current pagesample, standard output.
    group1.groupstatby(sa="2000Q1 2005Q4")  country
	Shows means of the series contained in the group group1 by country, with output transposed, using the sample "2000Q1 2005Q2"
    group1.groupstatby(t)  country
	Shows means of the series contained in the group group1 by country, with output transposed, using the current pagesample
    group1.groupstatby(stat=std) country
	Shows standard deviations of the series contained in the group group1 by country 
    group1.groupstatby(stat=quant=0.95) country
	Shows the 0.95-percentiles of the series contained in the group group1 by country 
    group1.groupstatby(stat=cor) country
	Shows the pairwise correlation coefficients of the series contained in the group group1 by country 
    group1.groupstatby(stat=cor, corout=matrix) country
	Shows the correlation matrices for the series contained for each of the classifiers in country


