From 808122840c175d1bc53c013629d0c719b9729aec Mon Sep 17 00:00:00 2001 From: "Mingze (Rico) Huang" Date: Wed, 31 Aug 2022 11:46:40 -0500 Subject: [PATCH] minor correction --- .Rbuildignore | 2 ++ .gitignore | 2 ++ supplement/unbias_check.R | 2 +- vignettes/latentcor.Rmd | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 3a24e86..905ffad 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,3 +12,5 @@ ^LICENSE$ ^CODE_OF_CONDUCT.md$ ^CONTRIBUTING.md$ +^doc$ +^Meta$ diff --git a/.gitignore b/.gitignore index 4937abd..9afa7f8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ .Rdata .httr-oauth .DS_Store +/doc/ +/Meta/ diff --git a/supplement/unbias_check.R b/supplement/unbias_check.R index 3e67b7a..78c28c7 100644 --- a/supplement/unbias_check.R +++ b/supplement/unbias_check.R @@ -21,7 +21,7 @@ for (tp1 in c("con", "bin", "ter", "tru")) { R_org = latentcor(X, types = c(tp1, tp2), method = "original")$R R_approx = latentcor(X, types = c(tp1, tp2), method = "approx")$R R_conapprox = latentcor(X, types = c(ifelse(tp1 == "ter", "con", tp1), ifelse(tp2 == "ter", "con", tp2)), method = "original")$R - rhorep[rep] = rho; Rrep[rep, 1] = R_org[2, 1]; Rrep[rep, 2] = R_approx[2, 1]; Rrep[rep, 3] = cor(X)[2, 1]; Rrep[rep, 4] = R_conapprox[2, 1] + Rrep[rep, 1] = R_org[2, 1]; Rrep[rep, 2] = R_approx[2, 1]; Rrep[rep, 3] = cor(X)[2, 1]; Rrep[rep, 4] = R_conapprox[2, 1] } assign(paste("R", cp1, cp2, tp1, tp2, "org", sep = "_"), Rrep[ , 1]) assign(paste("R", cp1, cp2, tp1, tp2, "approx", sep = "_"), Rrep[ , 2]) diff --git a/vignettes/latentcor.Rmd b/vignettes/latentcor.Rmd index 0433323..9fb0fd9 100644 --- a/vignettes/latentcor.Rmd +++ b/vignettes/latentcor.Rmd @@ -205,7 +205,7 @@ for (s in 1:10){ # Select a random subsample of size 80 subsample = sample(1:100, 80) # Estimate latent correlation on subsample specifying the types - Rs = latentcor(simdata2$X[subsample, ], types = NULL) + Rs = latentcor(simdata2$X[subsample, ], types = get_types(simdata2$X)) } proc.time() - start_time ```