-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
2,444 additions
and
1,467 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,3 @@ _freeze/ | |
*_files/ | ||
/cache/ | ||
/data/ | ||
model-ar1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
all: renv docs | ||
|
||
renv: renv.lock | ||
Rscript -e "renv::restore()" | ||
|
||
docs: index.qmd | ||
quarto render | ||
|
||
clean: | ||
rm -rf *.pdf *.typ *.png *_cache/ *_files/ docs/ | ||
|
||
clean-hard: | ||
rm -rf *.pdf *.typ *.png *_cache/ *_files/ docs/ cache/ | ||
|
||
.PHONY: all clean clean-hard |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,32 @@ | ||
# Introduction to latent means models in R | ||
|
||
|
||
Repository for our manuscript discussing an | ||
[R](https://cran.r-project.org/) and | ||
[brms](https://cran.r-project.org/web/packages/brms/) implementation of | ||
latent mean centering in multilevel models of longitudinal psychological | ||
data. | ||
Repository for our manuscript discussing an [R](https://cran.r-project.org/) and [brms](https://cran.r-project.org/web/packages/brms/) implementation of latent mean centering in multilevel models of longitudinal psychological data. | ||
|
||
- Repo on GitHub: <https://github.com/mvuorre/latent-mean-centering-ms> | ||
- Repo on GitHub: <https://github.com/mvuorre/funky-firefly> | ||
- Archived repo: tbd | ||
- Online: tbd | ||
- preprint: tbd | ||
|
||
## Reproduce | ||
|
||
Everything is coded in [R](https://cran.r-project.org/) and bunched | ||
together as a [Quarto](https://quarto.org/) website. To reproduce, clone | ||
the repo and render the Quarto documents: | ||
To reproduce, download our materials, restore the R environment (renv) and knit `ms.Rmd`. | ||
|
||
In terminal: | ||
|
||
``` bash | ||
# Download materials | ||
git clone https://github.com/mvuorre/latent-mean-centering-ms.git | ||
cd latent-mean-centering-ms | ||
git clone https://github.com/mvuorre/funky-firefly.git | ||
|
||
# Set up R environment | ||
Rscript -e 'renv::restore(prompt = FALSE)' | ||
# Enter directory | ||
cd funky-firefly | ||
|
||
# Modify environment variables in .Renviron.example & rename it to .Renviron | ||
# (Optional) modify .Renviron.example & rename it to .Renviron | ||
|
||
# Run code and render outputs | ||
quarto render | ||
# Run code and produce outputs | ||
make | ||
``` | ||
|
||
Once the computations are finished (this will take a long time depending | ||
on your computer) the rendered documents are in `docs/`. | ||
|
||
## Contribute | ||
|
||
Contributions preferably via pull requests. You can also grab the | ||
rendered manuscript (Word, PDF) from the latest | ||
[release](https://github.com/mvuorre/latent-mean-centering-ms/releases) | ||
for comments & edits. | ||
Contributions preferably via pull requests. You can also grab the rendered manuscript (Word, PDF) from the latest [release](https://github.com/mvuorre/latent-mean-centering-ms/releases) for comments & edits. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
title: Preprint | ||
author: Matti Vuorre | ||
version: 0.9.0 | ||
quarto-required: ">=1.5.47" | ||
contributes: | ||
formats: | ||
typst: | ||
template-partials: | ||
- typst-template.typ | ||
- typst-show.typ | ||
format-resources: | ||
- '*.svg' | ||
docx: | ||
reference-doc: preprint.docx |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
#show: doc => preprint( | ||
$if(title)$ | ||
title: [$title$], | ||
$endif$ | ||
$if(running-head)$ | ||
running-head: [$running-head$], | ||
$endif$ | ||
$if(by-author)$ | ||
authors: ( | ||
$for(by-author)$ | ||
$if(it.name.literal)$ | ||
( name: [$it.name.literal$], | ||
affiliation: [$for(it.affiliations)$$it.id$$sep$, $endfor$], | ||
$if(it.orcid)$orcid: "https://orcid.org/$it.orcid$",$endif$ | ||
$if(it.email)$email: [$it.email$]$endif$), | ||
$endif$ | ||
$endfor$ | ||
), | ||
$endif$ | ||
$if(affiliations)$ | ||
affiliations: ( | ||
$for(affiliations)$( | ||
id: "$it.id$", | ||
name: "$it.name$", | ||
$if(it.department)$department: "$it.department$"$endif$ | ||
), | ||
$endfor$ | ||
), | ||
$endif$ | ||
$if(date)$ | ||
date: [$date$], | ||
$endif$ | ||
$if(leading)$ | ||
leading: $leading$, | ||
$endif$ | ||
$if(branding)$ | ||
branding: "$branding$", | ||
$endif$ | ||
$if(spacing)$ | ||
spacing: $spacing$, | ||
$endif$ | ||
$if(linkcolor)$ | ||
linkcolor: $linkcolor$, | ||
$endif$ | ||
$if(citation)$ | ||
citation: ( | ||
type: "$citation.type$", | ||
container-title: "$citation.container-title$", | ||
doi: "$citation.doi$", | ||
url: "$citation.url$" | ||
), | ||
$endif$ | ||
$if(authornote)$ | ||
authornote: [$authornote$], | ||
$endif$ | ||
$if(lang)$ | ||
lang: "$lang$", | ||
$endif$ | ||
$if(region)$ | ||
region: "$region$", | ||
$endif$ | ||
$if(abstract)$ | ||
abstract: [$abstract$], | ||
$endif$ | ||
$if(keywords)$ | ||
keywords: [$for(keywords)$$it$$sep$, $endfor$], | ||
$endif$ | ||
$if(margin)$ | ||
margin: ($for(margin/pairs)$$margin.key$: $margin.value$,$endfor$), | ||
$endif$ | ||
$if(papersize)$ | ||
paper: "$papersize$", | ||
$endif$ | ||
$if(mainfont)$ | ||
font: ("$mainfont$",), | ||
$endif$ | ||
$if(fontsize)$ | ||
fontsize: $fontsize$, | ||
$endif$ | ||
$if(section-numbering)$ | ||
section-numbering: "$section-numbering$", | ||
$endif$ | ||
$if(toc)$ | ||
toc: $toc$, | ||
$endif$ | ||
$if(toc_depth)$ | ||
toc_depth: $toc_depth$, | ||
$endif$ | ||
$if(toc_title)$ | ||
toc_title: "$toc_title$", | ||
$endif$ | ||
$if(toc_indent)$ | ||
toc_indent: "$toc_indent$", | ||
$endif$ | ||
$if(columns)$ | ||
cols: $columns$, | ||
$endif$ | ||
$if(col-gutter)$ | ||
col-gutter: $col-gutter$, | ||
$endif$ | ||
$if(bibliography-style)$ | ||
bibliography-style: [$bibliography-style$], | ||
$endif$ | ||
$if(bibliography-title)$ | ||
bibliography-title: [$bibliography-title$], | ||
$endif$ | ||
doc, | ||
) |
Oops, something went wrong.