Skip to content

Commit

Permalink
Automated build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeksterslab committed Dec 13, 2024
1 parent 2b5d9d6 commit 6b48c0e
Show file tree
Hide file tree
Showing 30 changed files with 5,664 additions and 79 deletions.
Binary file modified .setup/build/cTMed.pdf
Binary file not shown.
Binary file modified .setup/build/cTMed_1.0.2.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion .setup/cpp/cTMed-indirect-central-s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::export(.IndirectCentrals)]]
arma::mat IndirectCentrals(const arma::mat& phi, const arma::vec& delta_t) {
arma::mat output(phi.n_rows, delta_t.n_elem, arma::fill::none);
arma::mat output(phi.n_rows, delta_t.n_elem, arma::fill::zeros);
arma::mat total(phi.n_rows, phi.n_cols, arma::fill::none);
arma::mat direct(phi.n_rows, phi.n_cols, arma::fill::none);
arma::mat d = arma::eye(phi.n_rows, phi.n_cols);
Expand Down
18 changes: 16 additions & 2 deletions .setup/latex/bib/bib.bib
Original file line number Diff line number Diff line change
Expand Up @@ -4098,7 +4098,7 @@ @Article{Yu-Pesigan-Zhang-etal-2019
}

@Article{Yu-Wu-Pesigan-2015,
author = {Shu Yu and Anise Man Sze Wu and Ivan Jacob Agaloos Pesigan},
author = {Shu M. Yu and Anise Man Sze Wu and Ivan Jacob Agaloos Pesigan},
date = {2015-12},
journaltitle = {International Journal of Mental Health and Addiction},
title = {Cognitive and psychosocial health risk factors of social networking addiction},
Expand Down Expand Up @@ -4168,6 +4168,20 @@ @Article{Zamboanga-Pesigan-Tomaso-etal-2015
publisher = {Elsevier BV},
}

@Article{Zhang-2018,
author = {Guangjian Zhang},
date = {2018-01},
journaltitle = {Multivariate Behavioral Research},
title = {Testing process factor analysis models using the parametric bootstrap},
doi = {10.1080/00273171.2017.1415123},
issn = {1532-7906},
number = {2},
pages = {219--230},
volume = {53},
abstract = {Process factor analysis (PFA) is a latent variable model for intensive longitudinal data. It combines P-technique factor analysis and time series analysis. The goodness-of-fit test in PFA is currently unavailable. In the paper, we propose a parametric bootstrap method for assessing model fit in PFA. We illustrate the test with an empirical data set in which 22 participants rated their effects everyday over a period of 90 days. We also explore Type I error and power of the parametric bootstrap test with simulated data.},
publisher = {Informa UK Limited},
}

@Article{Zhang-Ku-Wu-et-al-2019,
author = {Meng Xuan Zhang and Lisbeth Ku and Anise M. S. Wu and Shu M. Yu and Ivan Jacob Agaloos Pesigan},
date = {2019-09},
Expand All @@ -4186,7 +4200,7 @@ @Article{Zhang-Pesigan-Kahler-etal-2019
author = {Meng Xuan Zhang and Ivan Jacob Agaloos Pesigan and Christopher W. Kahler and Michael C.W. Yip and Shu Yu and Anise M.S. Wu},
date = {2019-03},
journaltitle = {Addictive Behaviors},
title = {Psychometric properties of a Chinese version of the Brief Young Adult Alcohol Consequences Questionnaire (B-YAACQ)},
title = {Psychometric properties of a {Chinese} version of the {Brief Young Adult Alcohol Consequences Questionnaire (B-YAACQ)}},
doi = {10.1016/j.addbeh.2018.11.045},
issn = {0306-4603},
pages = {389--394},
Expand Down
11 changes: 0 additions & 11 deletions .setup/latex/bib/quarto.bib

This file was deleted.

5 changes: 5 additions & 0 deletions .setup/latex/pdf/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
*/
!*.pdf
!.gitignore
!bib.bib
5,525 changes: 5,525 additions & 0 deletions .setup/latex/pdf/bib.bib

Large diffs are not rendered by default.

Binary file added .setup/latex/pdf/cTMed-001-description.pdf
Binary file not shown.
Binary file added .setup/latex/pdf/cTMed-999-session.pdf
Binary file not shown.
Binary file added .setup/latex/pdf/cTMed-zzz-references.pdf
Binary file not shown.
Binary file added .setup/latex/pdf/cTMed-zzz-tests-benchmark.pdf
Binary file not shown.
Binary file added .setup/latex/pdf/cTMed-zzz-tests-external.pdf
Binary file not shown.
Binary file added .setup/latex/pdf/cTMed-zzz-tests-internal.pdf
Binary file not shown.
Binary file added .setup/latex/pdf/cTMed-zzz-tests-staging.pdf
Binary file not shown.
49 changes: 29 additions & 20 deletions R/cTMed-posterior-phi.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,34 @@
#' @keywords cTMed posterior
#' @export
PosteriorPhi <- function(object) { # nocov start
stopifnot(
inherits(
x = object,
what = "ctStanFit"
if (requireNamespace("ctsem", quietly = TRUE)) {
stopifnot(
inherits(
x = object,
what = "ctStanFit"
)
)
)
varnames <- object$ctstanmodelbase$latentNames
posterior <- ctsem::ctExtract(object)$pop_DRIFT
out <- lapply(
X = seq_len(dim(posterior)[1]),
FUN = function(i) {
phi <- posterior[i, , ]
colnames(phi) <- rownames(phi) <- varnames
return(phi)
}
)
class(out) <- c(
"ctmedposteriorphi",
class(out)
)
return(out)
varnames <- object$ctstanmodelbase$latentNames
posterior <- ctsem::ctExtract(object)$pop_DRIFT
out <- lapply(
X = seq_len(dim(posterior)[1]),
FUN = function(i) {
phi <- posterior[i, , ]
colnames(phi) <- rownames(phi) <- varnames
return(phi)
}
)
class(out) <- c(
"ctmedposteriorphi",
class(out)
)
return(out)
} else {
stop(
paste(
"The 'ctsem' package is required for this functionality.",
"Please install it manually."
)
)
}
} # nocov end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cTMed
================
Ivan Jacob Agaloos Pesigan
2024-11-26
2024-12-13

<!-- README.md is generated from README.Rmd. Please edit that file -->

Expand Down
2 changes: 1 addition & 1 deletion src/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Rcpp::NumericVector ExpMean(const arma::mat& phi, const arma::vec& iota,
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::export(.IndirectCentrals)]]
arma::mat IndirectCentrals(const arma::mat& phi, const arma::vec& delta_t) {
arma::mat output(phi.n_rows, delta_t.n_elem, arma::fill::none);
arma::mat output(phi.n_rows, delta_t.n_elem, arma::fill::zeros);
arma::mat total(phi.n_rows, phi.n_cols, arma::fill::none);
arma::mat direct(phi.n_rows, phi.n_cols, arma::fill::none);
arma::mat d = arma::eye(phi.n_rows, phi.n_cols);
Expand Down
20 changes: 20 additions & 0 deletions tests/testthat/test-indirect-central.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@ lapply(
)
}
)
# testthat::test_that(
# paste(text, "IndirectCentrals"),

Check warning on line 40 in tests/testthat/test-indirect-central.R

View workflow job for this annotation

GitHub Actions / build

file=tests/testthat/test-indirect-central.R,line=40,col=9,[commented_code_linter] Commented code should be removed.
# {
# testthat::expect_true(
# all(
# (
# answer - c(
# as.vector(
# cTMed:::.IndirectCentrals(
# phi = phi,

Check warning on line 48 in tests/testthat/test-indirect-central.R

View workflow job for this annotation

GitHub Actions / build

file=tests/testthat/test-indirect-central.R,line=48,col=23,[commented_code_linter] Commented code should be removed.
# delta_t = delta_t

Check warning on line 49 in tests/testthat/test-indirect-central.R

View workflow job for this annotation

GitHub Actions / build

file=tests/testthat/test-indirect-central.R,line=49,col=23,[commented_code_linter] Commented code should be removed.
# )
# ),
# delta_t
# )
# ) <= tol
# )
# )
# }
# )
indirect_central <- IndirectCentral(
phi = phi,
delta_t = 1:5
Expand Down
Binary file modified vignettes/fig-vignettes-med-mc-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/fig-vignettes-med-mc-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/fig-vignettes-med-mc-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/fig-vignettes-med-std-mc-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/fig-vignettes-med-std-mc-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/fig-vignettes-med-std-mc-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions vignettes/fit-ct-var-dynr.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Fit the Continuous-Time Vector Autoregressive Model Using the dynr Package"
author: Ivan Jacob Agaloos Pesigan
date: "2024-11-26"
date: "2024-12-13"
bibliography: "vignettes.bib"
csl: https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl
nocite: |
Expand Down Expand Up @@ -297,8 +297,8 @@ fit <- dynr.cook(
#>
#> Doing end processing
#> Successful trial
#> Total Time: 6.121341
#> Backend Time: 6.108856
#> Total Time: 4.905515
#> Backend Time: 4.893933
summary(fit)
#> Coefficients:
#> Estimate Std. Error t value ci.lower ci.upper Pr(>|t|)
Expand Down
6 changes: 3 additions & 3 deletions vignettes/fit-ct-var-mx.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Fit the Continuous-Time Vector Autoregressive Model Using the OpenMx Package"
author: Ivan Jacob Agaloos Pesigan
date: "2024-11-26"
date: "2024-12-13"
bibliography: "vignettes.bib"
csl: https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl
nocite: |
Expand Down Expand Up @@ -531,8 +531,8 @@ summary(fit)
#> RMSEA: 0 [95% CI (NA, NA)]
#> Prob(RMSEA <= 0.05): NA
#> To get additional fit indices, see help(mxRefModels)
#> timestamp: 2024-11-26 01:18:11
#> Wall clock time: 200.0285 secs
#> timestamp: 2024-12-13 02:53:07
#> Wall clock time: 175.3345 secs
#> optimizer: SLSQP
#> OpenMx version number: 2.21.13
#> Need help? See help(mxSummary)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/med-std.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Standardized Total, Direct, and Indirect Effects in Continuous-Time Mediation Model"
author: Ivan Jacob Agaloos Pesigan
date: "2024-11-26"
date: "2024-12-13"
bibliography: "vignettes.bib"
csl: https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl
nocite: |
Expand Down
2 changes: 1 addition & 1 deletion vignettes/med.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Total, Direct, and Indirect Effects in Continuous-Time Mediation Model"
author: Ivan Jacob Agaloos Pesigan
date: "2024-11-26"
date: "2024-12-13"
bibliography: "vignettes.bib"
csl: https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl
nocite: |
Expand Down
75 changes: 42 additions & 33 deletions vignettes/session.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,16 @@ sessionInfo()
``` r
installed.packages()[, c("Package", "Version")]
#> Package Version
#> cpp11 "cpp11" "0.5.1"
#> cTMed "cTMed" "1.0.2"
#> httr2 "httr2" "1.0.7"
#> later "later" "1.4.1"
#> lubridate "lubridate" "1.9.4"
#> promises "promises" "1.3.2"
#> rProject "rProject" "0.0.14"
#> testthat "testthat" "3.2.2.9000"
#> textshaping "textshaping" "0.4.1"
#> usethis "usethis" "3.1.0"
#> abind "abind" "1.4-8"
#> arm "arm" "1.14-4"
#> arrow "arrow" "17.0.0.1"
Expand Down Expand Up @@ -475,51 +484,51 @@ installed.packages()[, c("Package", "Version")]
```
#> Architecture: x86_64
#> CPU op-mode(s): 32-bit, 64-bit
#> Address sizes: 46 bits physical, 48 bits virtual
#> Address sizes: 39 bits physical, 48 bits virtual
#> Byte Order: Little Endian
#> CPU(s): 24
#> On-line CPU(s) list: 0-23
#> CPU(s): 8
#> On-line CPU(s) list: 0-7
#> Vendor ID: GenuineIntel
#> Model name: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
#> Model name: Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz
#> CPU family: 6
#> Model: 79
#> Thread(s) per core: 1
#> Core(s) per socket: 12
#> Socket(s): 2
#> Stepping: 1
#> CPU max MHz: 2900.0000
#> CPU min MHz: 1200.0000
#> BogoMIPS: 4389.66
#> Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap intel_pt xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts md_clear flush_l1d
#> L1d cache: 768 KiB (24 instances)
#> L1i cache: 768 KiB (24 instances)
#> L2 cache: 6 MiB (24 instances)
#> L3 cache: 60 MiB (2 instances)
#> NUMA node(s): 2
#> NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22
#> NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23
#> Vulnerability Gather data sampling: Not affected
#> Vulnerability Itlb multihit: KVM: Mitigation: VMX unsupported
#> Vulnerability L1tf: Mitigation; PTE Inversion
#> Vulnerability Mds: Mitigation; Clear CPU buffers; SMT disabled
#> Vulnerability Meltdown: Mitigation; PTI
#> Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT disabled
#> Model: 142
#> Thread(s) per core: 2
#> Core(s) per socket: 4
#> Socket(s): 1
#> Stepping: 12
#> CPU max MHz: 4100.0000
#> CPU min MHz: 400.0000
#> BogoMIPS: 3799.90
#> Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities
#> Virtualization: VT-x
#> L1d cache: 128 KiB (4 instances)
#> L1i cache: 128 KiB (4 instances)
#> L2 cache: 1 MiB (4 instances)
#> L3 cache: 6 MiB (1 instance)
#> NUMA node(s): 1
#> NUMA node0 CPU(s): 0-7
#> Vulnerability Gather data sampling: Mitigation; Microcode
#> Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
#> Vulnerability L1tf: Not affected
#> Vulnerability Mds: Not affected
#> Vulnerability Meltdown: Not affected
#> Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
#> Vulnerability Reg file data sampling: Not affected
#> Vulnerability Retbleed: Not affected
#> Vulnerability Retbleed: Mitigation; Enhanced IBRS
#> Vulnerability Spec rstack overflow: Not affected
#> Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
#> Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
#> Vulnerability Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
#> Vulnerability Srbds: Not affected
#> Vulnerability Tsx async abort: Mitigation; Clear CPU buffers; SMT disabled
#> Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop
#> Vulnerability Srbds: Mitigation; Microcode
#> Vulnerability Tsx async abort: Mitigation; TSX disabled
```

# Memory


```
#> total used free shared buff/cache available
#> Mem: 125Gi 4.1Gi 40Gi 5.1Gi 80Gi 115Gi
#> Swap: 0B 0B 0B
#> Total: 125Gi 4.1Gi 40Gi
#> Mem: 23Gi 4.8Gi 3.7Gi 599Mi 14Gi 17Gi
#> Swap: 11Gi 0B 11Gi
#> Total: 34Gi 4.8Gi 15Gi
```
18 changes: 16 additions & 2 deletions vignettes/vignettes.bib
Original file line number Diff line number Diff line change
Expand Up @@ -4098,7 +4098,7 @@ @Article{Yu-Pesigan-Zhang-etal-2019
}

@Article{Yu-Wu-Pesigan-2015,
author = {Shu Yu and Anise Man Sze Wu and Ivan Jacob Agaloos Pesigan},
author = {Shu M. Yu and Anise Man Sze Wu and Ivan Jacob Agaloos Pesigan},
date = {2015-12},
journaltitle = {International Journal of Mental Health and Addiction},
title = {Cognitive and psychosocial health risk factors of social networking addiction},
Expand Down Expand Up @@ -4168,6 +4168,20 @@ @Article{Zamboanga-Pesigan-Tomaso-etal-2015
publisher = {Elsevier BV},
}

@Article{Zhang-2018,
author = {Guangjian Zhang},
date = {2018-01},
journaltitle = {Multivariate Behavioral Research},
title = {Testing process factor analysis models using the parametric bootstrap},
doi = {10.1080/00273171.2017.1415123},
issn = {1532-7906},
number = {2},
pages = {219--230},
volume = {53},
abstract = {Process factor analysis (PFA) is a latent variable model for intensive longitudinal data. It combines P-technique factor analysis and time series analysis. The goodness-of-fit test in PFA is currently unavailable. In the paper, we propose a parametric bootstrap method for assessing model fit in PFA. We illustrate the test with an empirical data set in which 22 participants rated their effects everyday over a period of 90 days. We also explore Type I error and power of the parametric bootstrap test with simulated data.},
publisher = {Informa UK Limited},
}

@Article{Zhang-Ku-Wu-et-al-2019,
author = {Meng Xuan Zhang and Lisbeth Ku and Anise M. S. Wu and Shu M. Yu and Ivan Jacob Agaloos Pesigan},
date = {2019-09},
Expand All @@ -4186,7 +4200,7 @@ @Article{Zhang-Pesigan-Kahler-etal-2019
author = {Meng Xuan Zhang and Ivan Jacob Agaloos Pesigan and Christopher W. Kahler and Michael C.W. Yip and Shu Yu and Anise M.S. Wu},
date = {2019-03},
journaltitle = {Addictive Behaviors},
title = {Psychometric properties of a Chinese version of the Brief Young Adult Alcohol Consequences Questionnaire (B-YAACQ)},
title = {Psychometric properties of a {Chinese} version of the {Brief Young Adult Alcohol Consequences Questionnaire (B-YAACQ)}},
doi = {10.1016/j.addbeh.2018.11.045},
issn = {0306-4603},
pages = {389--394},
Expand Down

0 comments on commit 6b48c0e

Please sign in to comment.