RainbowStats™ · Analysis commands
CROSS_SECTION
Build a cross section from dated series or a quoted HTTPS CSV URL.
Syntax
CROSS_SECTION(seriesList,date)
CROSS_SECTION("https://cran.r-universe.dev/ADER/data/algas/csv")Example or template
C=CROSS_SECTION(ALIGNED_COUNTY_LIST,20230101)
EXTRACT(C,"summary")Undated CSV observations
Algae=CROSS_SECTION("https://cran.r-universe.dev/ADER/data/algas/csv")
Fra=EXTRACT(Algae,"where:Sp=Fra")
EXTRACT(Fra,"data")Each CSV record is one observation. CROSS_SECTION(url,limit) accepts a positive integer observation limit. The default is 20,000, excluding the header. Catalog studies may set the optional JSON field limit. For CSV, data or table shows original columns; matrix and values return numeric columns in file order. The existing OLS extract uses the first numeric column as outcome. Filters match case-sensitive column names and exact values. Blank, NA and NaN are missing in numeric columns. The host allowlist defaults to cran.r-universe.dev and can be set with -Drainbowstats.csv.hosts=host1,host2.
Bar charts of CSV observations
Elwha=CROSS_SECTION("https://rainbowstats.com/data/elwha_first_detections.csv")
Chart=EX(Elwha,"bar:other_minus_edna_months:species:upstream_of")
Append | followed by plain text to print a caption on the chart slide. Use SLIDE(Chart,EX(Elwha,"table")) to present the chart and observations together.
Use bar:value:label with an optional fourth field to group the rows. Each observation retains its own value. Groups share a scale. Zero has a marker and a missing value has an empty bar. In this study, positive months mean eDNA was recorded earlier, negative months mean the other method was recorded earlier, and zero means the same month.
Binary probit, one-way ANOVA and contingency tables
P=EX(Algae,probit)
A=EX(Algae,"anova:Long:Sp")
T=EX(Algae,"contingency:Sp:Estado")Probit uses the logit column-selection rules and the normal CDF. Use probit_model:Y:X1,X2[:group] to choose columns explicitly. ANOVA tests equality of group means assuming independent observations and common within-group variance. The contingency table shows counts, row percentages, margins and the asymptotic Pearson test of independence. Sparse expected counts can make that approximation unreliable. Group tests use complete pairs from the selected CSV rows.
Cross-sectional logit slideshow
Study=EX(Algae,logit)
BySpecies=EX(Algae,"logit_model:Estado:Long:Sp")Use logit_model:Y:X1,X2 for multiple numeric predictors. Add :group for separate CSV group fits. Bare logit infers one binary outcome, one predictor, and at most one categorical group. Slides show coefficients and fitted probabilities. With multiple predictors, the chart displays ranked fitted probabilities within groups.
CSV studies
EXTRACT(Algae,"logit:Estado:Long:Sp") fits separate binary logits by species. EXTRACT(Algae,"group_summary:Long:Sp") reports descriptive statistics by species.
Details
Date is numeric YYYYMMDD. The result identifies observation rows and variable families from supported CDC codes, county FIPS, state series codes, or names in Variable - Observation form. Values prefer an exact date; annual sources may match the requested year. Use geographic aligners when assembling input lists. Regression summaries remain descriptive unless the research design supports a causal interpretation.
Uppercase placeholders such as ALIGNED_COUNTY_LIST refer to variables you supply. Interactive object controls and result rendering remain defined by the installed analysis classes.
Available extracts
Save the command result in a variable, then use EXTRACT(result, "key"). Availability can depend on the input form and fitted model.
slideshowtablebar:value:label[:group]where:column=valueprobitprobit_model:Y:X1,X2[:group]anova:value:groupcontingency:row:columnlogitlogit_model:Y:X1,X2[:group]group_summary:value:grouplogit:outcome:predictorlogit:outcome:predictor:groupdatamatrixvaluessummarycorrelationcorrelationsregressionresidualsoutliersactual_vs_fittedactual_fittedfitresidual_plotresidual_chartresidual_distributionbell_curvehistogram
In indexed patterns such as beta:n, replace n with the required index.