Skip to content

Commit a064b5f

Browse files
committed
Built site for ModelArray@0.1.5: ea4c053
1 parent 081b5f7 commit a064b5f

13 files changed

Lines changed: 180 additions & 98 deletions

llms.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,12 @@ These functions are called internally by the analysis functions. Most
175175
users should not call them directly.
176176

177177
- [`analyseOneElement.lm()`](https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.md)
178-
:
179-
180-
Fit a linear model for a single element If the number of subjects with
181-
finite scalar values (not `NaN`, `NA`, or `Inf`) does not exceed
182-
`num.subj.lthr`, the element is skipped and all statistics are set to
183-
`NaN`.
178+
: Fit a linear model for a single element
184179

185180
- [`analyseOneElement.gam()`](https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.md)
186181
:
187182

188-
Fit a GAM for a single element returns metadata (column names, smooth
183+
Fit a GAM for a single element Returns metadata (column names, smooth
189184
term names, parametric term names, and the smoothing parameter
190185
criterion attribute name) used by `ModelArray.gam` to initialise the
191186
output data.frame. When `flag_initiate = FALSE`, it returns a numeric

pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ articles:
1212
installations: installations.html
1313
modelling: modelling.html
1414
walkthrough: walkthrough.html
15-
last_built: 2026-04-08T19:53Z
15+
last_built: 2026-04-09T22:18Z
1616
urls:
1717
reference: https://pennlinc.github.io/ModelArray/reference
1818
article: https://pennlinc.github.io/ModelArray/articles

reference/ModelArray.wrap.html

Lines changed: 13 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reference/ModelArray.wrap.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,19 @@ ModelArray.wrap(
173173

174174
## Value
175175

176-
A tibble with one row per element and first column `element_id`
177-
(0-based). Remaining columns are determined by the return value of
178-
`FUN`.
176+
If `flag_initiate = TRUE`, a list with one component:
177+
178+
- column_names:
179+
180+
Character vector. The column names derived from the return value of
181+
`user_fun`, with `"element_id"` prepended. For unnamed list or atomic
182+
returns, columns are named `v1`, `v2`, etc. Set to `NaN` if the
183+
element was skipped or errored.
184+
185+
If `flag_initiate = FALSE`, a numeric vector of length `num.stat.output`
186+
with `element_id` (0-based) first and the coerced output of `user_fun`
187+
in subsequent positions. All-`NaN` (except `element_id`) if the element
188+
was skipped or if an error occurred with `on_error = "skip"`.
179189

180190
## Details
181191

reference/analyseOneElement.gam.html

Lines changed: 19 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reference/analyseOneElement.gam.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Fit a GAM for a single element returns metadata (column names, smooth term names, parametric term names, and the smoothing parameter criterion attribute name) used by [`ModelArray.gam`](https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.md) to initialise the output data.frame. When `flag_initiate = FALSE`, it returns a numeric vector representing one row of the final results matrix.
1+
# Fit a GAM for a single element Returns metadata (column names, smooth term names, parametric term names, and the smoothing parameter criterion attribute name) used by [`ModelArray.gam`](https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.md) to initialise the output data.frame. When `flag_initiate = FALSE`, it returns a numeric vector representing one row of the final results matrix.
22

33
If the number of subjects with finite scalar values does not exceed
44
`num.subj.lthr`, the element is skipped and all statistics are set to
@@ -9,18 +9,19 @@ If the number of subjects with finite scalar values does not exceed
99
``` r
1010
analyseOneElement.gam(
1111
i_element,
12-
formula,
13-
modelarray,
14-
phenotypes,
15-
scalar,
16-
var.smoothTerms,
17-
var.parametricTerms,
18-
var.model,
12+
formula = NULL,
13+
modelarray = NULL,
14+
phenotypes = NULL,
15+
scalar = NULL,
16+
var.smoothTerms = c("statistic", "p.value"),
17+
var.parametricTerms = c("estimate", "statistic", "p.value"),
18+
var.model = c("dev.expl"),
1919
num.subj.lthr,
2020
num.stat.output = NULL,
2121
flag_initiate = FALSE,
2222
flag_sse = FALSE,
2323
on_error = "stop",
24+
ctx = NULL,
2425
...
2526
)
2627
```
@@ -40,18 +41,18 @@ analyseOneElement.gam(
4041

4142
A
4243
[ModelArray](https://pennlinc.github.io/ModelArray/reference/ModelArray-class.md)
43-
object.
44+
object. Ignored when `ctx` is provided.
4445

4546
- phenotypes:
4647

4748
A data.frame of the cohort with columns of independent variables and
4849
covariates. Must contain a `"source_file"` column matching
49-
`sources(modelarray)[[scalar]]`.
50+
`sources(modelarray)[[scalar]]`. Ignored when `ctx` is provided.
5051

5152
- scalar:
5253

5354
Character. The name of the element-wise scalar to analyse. Must be one
54-
of `names(scalars(modelarray))`.
55+
of `names(scalars(modelarray))`. Ignored when `ctx` is provided.
5556

5657
- var.smoothTerms:
5758

@@ -110,6 +111,10 @@ analyseOneElement.gam(
110111
[`browser`](https://rdrr.io/r/base/browser.html) (if interactive) then
111112
skips. Default: `"stop"`.
112113

114+
- ctx:
115+
116+
A precomputed context list from `.build_gam_context()`, or `NULL`.
117+
113118
- ...:
114119

115120
Additional arguments passed to

0 commit comments

Comments
 (0)