Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
9eed82d
fixed workshop comparison models
Pascal-Kueng Jul 22, 2026
f0a5785
workshop updates
Pascal-Kueng Jul 22, 2026
7aed306
workshop updates
Pascal-Kueng Jul 22, 2026
d0189c6
added links
Pascal-Kueng Jul 22, 2026
e1eb99e
formula
Pascal-Kueng Jul 22, 2026
a33b074
centering in apims
Pascal-Kueng Jul 22, 2026
0f0b87a
vignettes now use grand-mean centred variables for APIMs
Pascal-Kueng Jul 22, 2026
30a8d81
added now RQs
Pascal-Kueng Jul 22, 2026
c0f61a0
motivation for CFM
Pascal-Kueng Jul 22, 2026
22d4d2b
headings
Pascal-Kueng Jul 22, 2026
980c2e6
add temporary workshop Pages workflow
Pascal-Kueng Jul 22, 2026
b53562c
update slides
Pascal-Kueng Jul 22, 2026
689774c
publish both workshop decks
Pascal-Kueng Jul 22, 2026
b5d8ef1
consistent headings
Pascal-Kueng Jul 22, 2026
202fcfc
Update dyad-day.html
Pascal-Kueng Jul 22, 2026
d42b283
slides
Pascal-Kueng Jul 22, 2026
bad83bc
Create apim-signup-position.Rmd
Pascal-Kueng Jul 22, 2026
95e53ff
added RSA slides
Pascal-Kueng Jul 22, 2026
e48c03f
alignment improvements
Pascal-Kueng Jul 22, 2026
43cd2c2
added model fit for RSA
Pascal-Kueng Jul 22, 2026
245288e
RSA now fit with my package prep
Pascal-Kueng Jul 22, 2026
9a67cc3
conceptual slides finished
Pascal-Kueng Jul 22, 2026
2fb12ee
update RQ labels
Pascal-Kueng Jul 22, 2026
e032559
Added summary method
Pascal-Kueng Jul 23, 2026
efa56af
final slides part I
Pascal-Kueng Jul 23, 2026
dd29f88
updated references
Pascal-Kueng Jul 23, 2026
42aeb9f
Update applied-tutorial.qmd
Pascal-Kueng Jul 23, 2026
37cd166
update workflopws
Pascal-Kueng Jul 23, 2026
268423c
slides update
Pascal-Kueng Jul 23, 2026
69f62ab
slides
Pascal-Kueng Jul 23, 2026
7706afe
improved
Pascal-Kueng Jul 23, 2026
ac5db9a
better R arguments
Pascal-Kueng Jul 23, 2026
6bb6972
added structure cross
Pascal-Kueng Jul 23, 2026
2792f28
Update applied-tutorial.qmd
Pascal-Kueng Jul 23, 2026
273b75b
Update applied-tutorial.qmd
Pascal-Kueng Jul 23, 2026
8c97ca3
rebuild workshop pages on branch pushes
Pascal-Kueng Jul 23, 2026
1b3a0a0
added audit folder
Pascal-Kueng Jul 23, 2026
13286ec
fix for package build
Pascal-Kueng Jul 23, 2026
0cb1732
excercisees added
Pascal-Kueng Jul 23, 2026
f93c6ec
updated slides
Pascal-Kueng Jul 23, 2026
eca3369
small edits
Pascal-Kueng Jul 23, 2026
a19da63
add DHARMa
Pascal-Kueng Jul 23, 2026
22167ba
Update Rplots.pdf
Pascal-Kueng Jul 23, 2026
c169d8a
the planned columns at initiation is now stored and re-used by later …
Pascal-Kueng Jul 24, 2026
8269966
updated slides
Pascal-Kueng Jul 24, 2026
32d5e5e
Update WORDLIST
Pascal-Kueng Jul 24, 2026
71fa933
tests for changes
Pascal-Kueng Jul 24, 2026
d8a47ad
sharper workflow
Pascal-Kueng Jul 24, 2026
d59c005
incorporated workable short-colnames
Pascal-Kueng Jul 24, 2026
2e0fd32
updated slides and readme
Pascal-Kueng Jul 24, 2026
4ca65c2
added items
Pascal-Kueng Jul 24, 2026
a921ed7
restored correct refs
Pascal-Kueng Jul 24, 2026
2317afc
set up totorial
Pascal-Kueng Jul 24, 2026
75e3990
update slides
Pascal-Kueng Jul 24, 2026
721645d
updated actions to build vignettes on each push
Pascal-Kueng Jul 24, 2026
cb1ae9c
check
Pascal-Kueng Jul 24, 2026
2421e77
rename role to gender
Pascal-Kueng Jul 24, 2026
7e0b137
re-ordered dataset and fixed pkdown export
Pascal-Kueng Jul 24, 2026
e45ed9e
small table fix
Pascal-Kueng Jul 24, 2026
01d8882
better data
Pascal-Kueng Jul 24, 2026
1e656c8
updated install isntruct and simpler df
Pascal-Kueng Jul 24, 2026
421e1b5
updated printing
Pascal-Kueng Jul 24, 2026
6fbf783
clearar cols
Pascal-Kueng Jul 24, 2026
537614d
visualize early
Pascal-Kueng Jul 24, 2026
6603875
slide updates
Pascal-Kueng Jul 24, 2026
7ae918e
Update applied-tutorial.qmd
Pascal-Kueng Jul 24, 2026
76b807a
validate data
Pascal-Kueng Jul 24, 2026
76e7164
Polish workshop tutorials and slide tables
Pascal-Kueng Jul 24, 2026
c7f82b6
replace .dy_ with only leading dot
Pascal-Kueng Jul 24, 2026
40c821d
leading dot test updates.
Pascal-Kueng Jul 24, 2026
228de3e
add report as suggest
Pascal-Kueng Jul 25, 2026
ed9ef54
add package help page
Pascal-Kueng Jul 25, 2026
8b52684
slide updates
Pascal-Kueng Jul 25, 2026
49544f4
slide updates
Pascal-Kueng Jul 25, 2026
22238d7
nicer tables
Pascal-Kueng Jul 25, 2026
e0086dd
update slides
Pascal-Kueng Jul 25, 2026
e86a536
slides update
Pascal-Kueng Jul 25, 2026
29ee655
added optional retaining/creation of arbitrary idiff assignment for d…
Pascal-Kueng Jul 25, 2026
21ba3d2
slide updates
Pascal-Kueng Jul 25, 2026
1c4ceac
update with retain user-contrast
Pascal-Kueng Jul 25, 2026
268bfaf
only list workflow functions
Pascal-Kueng Jul 25, 2026
1e3ab9d
Update applied-tutorial.html
Pascal-Kueng Jul 25, 2026
aad4a52
slide changes
Pascal-Kueng Jul 25, 2026
4e72dc8
Update applied-tutorial.qmd
Pascal-Kueng Jul 25, 2026
55e51dc
update slides
Pascal-Kueng Jul 25, 2026
4d9e5e6
slides update
Pascal-Kueng Jul 25, 2026
3fab830
slides updates
Pascal-Kueng Jul 25, 2026
6bd6c69
Update applied-tutorial.qmd
Pascal-Kueng Jul 25, 2026
63a2452
update notation
Pascal-Kueng Jul 25, 2026
2335290
Update applied-tutorial.qmd
Pascal-Kueng Jul 25, 2026
0a980b2
slide updates
Pascal-Kueng Jul 25, 2026
6ae69d9
final equation
Pascal-Kueng Jul 25, 2026
c04aa28
slide updates
Pascal-Kueng Jul 25, 2026
8e6b447
better slides
Pascal-Kueng Jul 25, 2026
22de135
Update applied-tutorial.qmd
Pascal-Kueng Jul 25, 2026
eae5e33
introduce _gmc centering feature for apim cols
Pascal-Kueng Jul 25, 2026
a4411c0
Update applied-tutorial.qmd
Pascal-Kueng Jul 25, 2026
df1f0f0
Update applied-tutorial.qmd
Pascal-Kueng Jul 25, 2026
d655710
Update applied-tutorial.qmd
Pascal-Kueng Jul 25, 2026
b7140ea
Update applied-tutorial.qmd
Pascal-Kueng Jul 25, 2026
22001c8
renamed exported fnction to compare_nested_models
Pascal-Kueng Jul 26, 2026
90cb1b0
DHARMa
Pascal-Kueng Jul 26, 2026
a5a10cf
slides update
Pascal-Kueng Jul 26, 2026
3c0e432
slides updates
Pascal-Kueng Jul 26, 2026
277533e
slide updates
Pascal-Kueng Jul 26, 2026
f52dea5
slides updated
Pascal-Kueng Jul 26, 2026
c615ead
10k simulation
Pascal-Kueng Jul 26, 2026
d0dafd3
slides
Pascal-Kueng Jul 26, 2026
03e9ab4
checkpoint
Pascal-Kueng Jul 26, 2026
018803d
slide updates
Pascal-Kueng Jul 27, 2026
ee92288
update slides
Pascal-Kueng Jul 27, 2026
5e1a788
slide updates
Pascal-Kueng Jul 27, 2026
e108315
Update applied-tutorial.qmd
Pascal-Kueng Jul 27, 2026
837f221
Update applied-tutorial.qmd
Pascal-Kueng Jul 27, 2026
1a9d5ab
Update exercises.Rmd
Pascal-Kueng Jul 27, 2026
c211516
Update exercises.Rmd
Pascal-Kueng Jul 27, 2026
a1a146a
Update exercises.Rmd
Pascal-Kueng Jul 27, 2026
7d65c27
fixed workflows
Pascal-Kueng Jul 27, 2026
0e6516a
Update exercises.Rmd
Pascal-Kueng Jul 27, 2026
30eb015
slides updates
Pascal-Kueng Jul 27, 2026
3d55755
Update applied-tutorial.qmd
Pascal-Kueng Jul 27, 2026
10b4b0f
updated slideds
Pascal-Kueng Jul 27, 2026
48b0c2c
Update applied-tutorial.qmd
Pascal-Kueng Jul 27, 2026
c8186a3
Update applied-tutorial.qmd
Pascal-Kueng Jul 27, 2026
d304b39
excercises updates
Pascal-Kueng Jul 27, 2026
4796a34
create downloadable zip with each push
Pascal-Kueng Jul 27, 2026
db4aedd
excercises updated
Pascal-Kueng Jul 27, 2026
2f177a5
updated install instructions
Pascal-Kueng Jul 27, 2026
8dc7634
Update export-workshop-slides.sh
Pascal-Kueng Jul 27, 2026
4ea8bfb
fixed install script
Pascal-Kueng Jul 27, 2026
83d7418
better install for workshop
Pascal-Kueng Jul 27, 2026
62473dd
Update 01_exercises_cross_sectional.Rmd
Pascal-Kueng Jul 27, 2026
b79d966
excercises
Pascal-Kueng Jul 27, 2026
350536f
updated exercises
Pascal-Kueng Jul 27, 2026
169a34c
improved hints
Pascal-Kueng Jul 28, 2026
8261666
finished exercises cross-sectional workshop
Pascal-Kueng Jul 28, 2026
4b21f1e
initializing ILD tutorial section
Pascal-Kueng Jul 28, 2026
0d17d39
updated tutorial
Pascal-Kueng Jul 28, 2026
31859e8
sensitivity analysis wording
Pascal-Kueng Jul 28, 2026
f65417a
workshop slides
Pascal-Kueng Jul 28, 2026
3555599
updated logic
Pascal-Kueng Jul 28, 2026
ddda6e3
renamed files for smoother flow
Pascal-Kueng Jul 28, 2026
4fbeb5c
ild updates and data
Pascal-Kueng Jul 28, 2026
fa2d025
improved presentation
Pascal-Kueng Jul 28, 2026
b939b81
cross-sectional workflow cleanup
Pascal-Kueng Jul 28, 2026
83ff5cc
updated slides
Pascal-Kueng Jul 28, 2026
b7e46af
updated exercise
Pascal-Kueng Jul 28, 2026
26afbd9
ILD section draft finished
Pascal-Kueng Jul 29, 2026
7a1dc11
updated simulated data to include AR1 processes.
Pascal-Kueng Jul 29, 2026
bdf02e2
Update applied-tutorial.html
Pascal-Kueng Jul 29, 2026
dfaceb5
fix for non-converging tutorial model
Pascal-Kueng Jul 29, 2026
b80e944
refined exercises
Pascal-Kueng Jul 29, 2026
0edd317
Update applied-tutorial.qmd
Pascal-Kueng Jul 29, 2026
e0cafa5
Update applied-tutorial.html
Pascal-Kueng Jul 29, 2026
274f193
improved slides
Pascal-Kueng Jul 29, 2026
7dd5b61
updated dataset and ild section
Pascal-Kueng Jul 29, 2026
d57411f
slide updates
Pascal-Kueng Jul 29, 2026
05a5e5e
improved ILD slides
Pascal-Kueng Jul 29, 2026
19fc391
improving ild section
Pascal-Kueng Jul 29, 2026
7be7516
better reporting on slides
Pascal-Kueng Jul 29, 2026
0ac8ae3
better plotting
Pascal-Kueng Jul 29, 2026
22e0b7d
better ILD flow
Pascal-Kueng Jul 29, 2026
3694034
finished ild section and exercises
Pascal-Kueng Jul 29, 2026
2d07dc7
slides update
Pascal-Kueng Jul 29, 2026
f962787
updated exercises
Pascal-Kueng Jul 29, 2026
f4ed315
better ild exercises
Pascal-Kueng Jul 29, 2026
65c51df
better exercise flow
Pascal-Kueng Jul 29, 2026
7cfbcb7
updated slides
Pascal-Kueng Jul 29, 2026
0ef6487
exercise prep in slides
Pascal-Kueng Jul 29, 2026
829b6a7
update links to exercises
Pascal-Kueng Jul 29, 2026
f5e6a76
Update applied-tutorial.html
Pascal-Kueng Jul 29, 2026
b64b295
Update applied-tutorial.qmd
Pascal-Kueng Jul 29, 2026
eb80cae
finished slides
Pascal-Kueng Jul 29, 2026
a76f0ad
small fixes
Pascal-Kueng Jul 29, 2026
3323df9
fixed plot
Pascal-Kueng Jul 29, 2026
805af12
better exercise
Pascal-Kueng Jul 29, 2026
6797bd0
Update hints.R
Pascal-Kueng Jul 29, 2026
830dbfb
simplified
Pascal-Kueng Jul 29, 2026
6f852ac
Update dyad-day.html
Pascal-Kueng Jul 30, 2026
07ecbb1
Clean up workshop publishing artifacts
Pascal-Kueng Aug 1, 2026
d3645c5
Clean up stale development artifacts
Pascal-Kueng Aug 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
^codecov\.yml$
^cran-comments\.md$
^CRAN-SUBMISSION$
^tmp$
^Rplots\.pdf$
^dyadMLM_.*\.tar\.gz$
59 changes: 59 additions & 0 deletions .github/scripts/export-workshop-slides.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env bash

set -euo pipefail

repository_root="$(cd "${1:-.}" && pwd)"
workshop_output="${repository_root}/docs/workshop"
decktape_image="ghcr.io/astefanutti/decktape:3.16.1@sha256:66f5eff34a444628f5ab524da5390a454412fa879f3d15df96daf4c5c8da6b33"
temporary_root="$(mktemp -d /tmp/dyadmlm-decktape.XXXXXX)"
temporary_input="${temporary_root}/input"
temporary_output="${temporary_root}/output"

cleanup() {
rm -rf -- "${temporary_root}"
}
trap cleanup EXIT

mkdir -p "${temporary_input}" "${temporary_output}" "${workshop_output}"

# DeckTape runs as a non-root user whose UID may differ from the host runner.
# This directory is temporary and contains only the generated PDFs.
chmod 0777 "${temporary_output}"

# Give the container only the publication-bound slide files.
cp "${repository_root}/dev/workshop/dyad-day.html" \
"${temporary_input}/dyad-day.html"
cp "${repository_root}/dev/workshop/applied-tutorial.html" \
"${temporary_input}/applied-tutorial.html"

# Fragments are intentionally disabled (DeckTape's default), yielding one PDF
# page per Reveal slide with ordinary fragments fully revealed.
docker run --rm \
--volume "${temporary_input}:/slides:ro,Z" \
--volume "${temporary_output}:/output:Z" \
"${decktape_image}" reveal \
--size 1050x700 \
--pause 1500 \
--load-pause 2000 \
--chrome-arg=--allow-file-access-from-files \
"file:///slides/dyad-day.html" \
"/output/01_conceptual_foundations.pdf"

docker run --rm \
--volume "${temporary_input}:/slides:ro,Z" \
--volume "${temporary_output}:/output:Z" \
"${decktape_image}" reveal \
--size 1050x700 \
--pause 1500 \
--load-pause 2000 \
--chrome-arg=--allow-file-access-from-files \
"file:///slides/applied-tutorial.html" \
"/output/02_applied_tutorial.pdf"

test -s "${temporary_output}/01_conceptual_foundations.pdf"
test -s "${temporary_output}/02_applied_tutorial.pdf"

install -m 0644 "${temporary_output}/01_conceptual_foundations.pdf" \
"${workshop_output}/01_conceptual_foundations.pdf"
install -m 0644 "${temporary_output}/02_applied_tutorial.pdf" \
"${workshop_output}/02_applied_tutorial.pdf"
115 changes: 112 additions & 3 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches: [main, master]
pull_request:
release:
types: [published]
workflow_dispatch:

name: pkgdown
Expand All @@ -24,26 +22,137 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Determine whether workshop materials changed
id: workshop-changes
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
BEFORE_SHA: ${{ github.event.before }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
HEAD_SHA: ${{ github.sha }}
run: |
rebuild=true
# Paths that directly define the published workshop outputs.
workshop_paths=(
dev/workshop
vignettes/diagram-helpers.Rinc
vignettes/dim-grid.Rinc
vignettes/references.bib
pkgdown/templates/content-workshop.html
_pkgdown.yml
.github/scripts/export-workshop-slides.sh
.github/workflows/pkgdown.yaml
)

if [[ "$EVENT_NAME" == "push" && ! "$BEFORE_SHA" =~ ^0+$ ]]; then
if git diff --quiet "$BEFORE_SHA" "$HEAD_SHA" -- \
"${workshop_paths[@]}"; then
rebuild=false
fi
elif [[ "$EVENT_NAME" == "pull_request" ]]; then
if git diff --quiet "$BASE_SHA...$PR_HEAD_SHA" -- \
"${workshop_paths[@]}"; then
rebuild=false
fi
fi

echo "rebuild=$rebuild" >> "$GITHUB_OUTPUT"

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
extra-packages: |
any::DHARMa
any::digest
any::ggplot2
any::gridExtra
any::modelbased
any::parameters
any::patchwork
any::pkgdown
any::report
any::RSA
any::see
any::tidyr
any::wbCorr
local::.
needs: website

- uses: quarto-dev/quarto-actions/setup@v2

- name: Render all workshop materials
if: steps.workshop-changes.outputs.rebuild == 'true'
run: |
quarto render dev/workshop/dyad-day.qmd
quarto render dev/workshop/applied-tutorial.qmd

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Export workshop slides to PDF
if: steps.workshop-changes.outputs.rebuild == 'true'
run: bash .github/scripts/export-workshop-slides.sh

- name: Add workshop materials
if: steps.workshop-changes.outputs.rebuild == 'true'
run: |
mkdir -p docs/workshop/conceptual docs/workshop/applied
Rscript -e 'pkgdown::render_page(".", "workshop", data = list(pagetitle = "Workshop", description = "Dyadic Data Analysis workshop materials."), path = "workshop/index.html", depth = 1)'
cp dev/workshop/dyad-day.html docs/workshop/conceptual/index.html
cp dev/workshop/applied-tutorial.html docs/workshop/applied/index.html
cp dev/workshop/03_exercises_cross_sectional.Rmd docs/workshop/03_exercises_cross_sectional.Rmd
cp dev/workshop/04_exercises_ild.Rmd docs/workshop/04_exercises_ild.Rmd
zip -jq docs/workshop/dyadic-data-analysis-workshop.zip \
dev/workshop/00_setup.R \
docs/workshop/01_conceptual_foundations.pdf \
docs/workshop/02_applied_tutorial.pdf \
dev/workshop/03_exercises_cross_sectional.Rmd \
dev/workshop/04_exercises_ild.Rmd \
dev/workshop/dyadic-data.rds \
dev/workshop/dyadic-ild-exercise.rds \
dev/workshop/dyadic-person-means.rds \
dev/workshop/helpers.R \
dev/workshop/hints.R

- name: Preserve previously published workshop materials
if: >-
steps.workshop-changes.outputs.rebuild != 'true' &&
github.event_name != 'pull_request'
run: |
git fetch --no-tags --depth=1 origin gh-pages
git archive --format=tar \
--output=/tmp/dyadmlm-published-workshop.tar \
FETCH_HEAD workshop
tar -xf /tmp/dyadmlm-published-workshop.tar -C docs

- name: Validate staged workshop materials
if: github.event_name != 'pull_request' || steps.workshop-changes.outputs.rebuild == 'true'
shell: bash
run: |
workshop_files=(
docs/workshop/index.html
docs/workshop/conceptual/index.html
docs/workshop/applied/index.html
docs/workshop/01_conceptual_foundations.pdf
docs/workshop/02_applied_tutorial.pdf
docs/workshop/03_exercises_cross_sectional.Rmd
docs/workshop/04_exercises_ild.Rmd
docs/workshop/dyadic-data-analysis-workshop.zip
)

for workshop_file in "${workshop_files[@]}"; do
test -s "$workshop_file"
done

unzip -tq docs/workshop/dyadic-data-analysis-workshop.zip

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ HANDOFF.md
docs
/dyadMLM_*.tar.gz
/*.Rcheck/
/Rplots.pdf
/dev/workshop/temp_audit/
/dev/workshop/applied-tutorial_cache/
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dyadMLM
Title: Tools for Dyadic Multilevel Models
Version: 0.1.0
Version: 0.1.0.9000
Authors@R:
person("Pascal", "Küng", , "kueng.pascal@gmail.com",
role = c("aut", "cre", "cph"),
Expand Down
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
S3method(print,dyadMLM_data)
S3method(print,dyadMLM_model_comparison)
S3method(print,exchangeable_rescov)
export(compare_nested_glmmTMB_models)
S3method(summary,dyadMLM_data)
export(compare_nested_models)
export(prepare_dyad_data)
export(recover_exchangeable_covariance)
importFrom(rlang,":=")
Expand Down
32 changes: 32 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# dyadMLM (development version)

* Retained generated columns now use a single leading dot instead of `.dy_`
for more readable model formulas; for example, `.dy_x_actor` becomes
`.x_actor`. The `.dy_` prefix is reserved for temporary implementation
columns.
* `prepare_dyad_data()` now uses compact composition-column names when the
final data contain one composition, such as `.is_female` and
`.member_contrast_arbitrary`. Set `short_colnames = FALSE` to retain
composition-qualified names. `recover_exchangeable_covariance()` recognizes
both forms.
* `prepare_dyad_data(include_arbitrary_member_contrast = TRUE)` can now add arbitrary
member contrasts for distinguishable compositions without changing their
metadata or role indicators. This supports full and
exchangeability-constrained APIMs from the same prepared data.
`set_exchangeable_compositions` still performs reclassification for pooling
and DIM preparation.
* Added a `summary()` method for prepared data that prints the dyadic structure
followed by standard summaries of all columns.
* Generated-column tracking now records all retained composition and modeling
columns. Printing and model comparison use these records rather than
inferring column ownership from a prefix, and generated names are checked for
collisions and valid R syntax before they are written.
* `prepare_dyad_data(add_apim_gmc_predictors = TRUE)` now adds GMC source,
actor, and partner columns alongside raw APIM columns, plus lagged variants
when requested. It uses one mean over retained non-missing values, warns
about skipped non-numeric predictors in mixed selections, and leaves DIM/DSM
centering unchanged.
* Renamed `compare_nested_glmmTMB_models()` to `compare_nested_models()`.
* Added package-level help at `?dyadMLM`, with links to the main functions,
example datasets, and getting-started documentation.

# dyadMLM 0.1.0

* Initial release.
Expand Down
15 changes: 10 additions & 5 deletions R/add_actor_partner_columns.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#' predictors, this will create actor and partner versions of the raw predictor
#' and each recorded predictor component, such as the within-person and
#' between-person components created by [center_predictors()].
#' Selected lag predictors additionally create lag-1 raw and within-person
#' actor and partner columns.
#' Selected lag predictors also create actor and partner columns for eligible
#' lagged components.
#'
#' The function will use the predictor decomposition metadata stored in
#' `attr(data, "dyadMLM")$temporal_decompositions`, so downstream code does
Expand Down Expand Up @@ -69,7 +69,7 @@ add_actor_partner_columns <- function(data) {
}
if (component == "raw") {
predictor_suffix <- make_dyad_suffixes(predictor)[[predictor]]
column_stem <- paste0(dyad_reserved_prefix, predictor_suffix)
column_stem <- paste0(dyad_retained_prefix, predictor_suffix)
}

lag_suffix <- make_predictor_lag_suffix(lag)
Expand All @@ -94,15 +94,19 @@ add_actor_partner_columns <- function(data) {
temporal_component = apim_predictors$component,
lag = apim_predictors$lag,
model_family = "apim",
column_role = "actor"
column_role = "actor",
variable_role = "predictor",
source_column = apim_predictors$source_column
),
tibble::tibble(
target = apim_predictors$partner_column,
predictor = apim_predictors$predictor,
temporal_component = apim_predictors$component,
lag = apim_predictors$lag,
model_family = "apim",
column_role = "partner"
column_role = "partner",
variable_role = "predictor",
source_column = apim_predictors$source_column
)
)
validate_generated_column_plan(out, apim_plan)
Expand Down Expand Up @@ -172,6 +176,7 @@ add_actor_partner_columns <- function(data) {
}

attr(out, "dyadMLM")$apim_predictors <- apim_predictors
out <- record_generated_columns(out, apim_plan)

return(out)
}
Loading