aboutsummaryrefslogtreecommitdiff
path: root/R/mean_degparms.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-04-12 10:09:30 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-04-12 10:09:30 +0200
commite99f089012c3c4a0b00ade470f180f3ee2b65e9a (patch)
tree9453683ecfac08e2584b6b34f4a33fc41fbc4386 /R/mean_degparms.R
parent6e559ef8680053873a8da51a000f6c2f2d28d719 (diff)
Fix using defaults for log rate constants
Diffstat (limited to 'R/mean_degparms.R')
-rw-r--r--R/mean_degparms.R4
1 files changed, 3 insertions, 1 deletions
diff --git a/R/mean_degparms.R b/R/mean_degparms.R
index fdcc5c00..861f27b5 100644
--- a/R/mean_degparms.R
+++ b/R/mean_degparms.R
@@ -37,7 +37,7 @@ mean_degparms <- function(object, random = FALSE, test_log_parms = FALSE, conf.l
parm_mat_trans_OK <- parm_mat_trans
for (trans_parm in log_parm_trans_names) {
parm_mat_trans_OK[trans_parm, ] <- ifelse(t_test_back_OK[trans_parm, ],
- parm_mat_trans[trans_parm, ], default_log_parms)
+ parm_mat_trans[trans_parm, ], log(default_log_parms))
}
} else {
parm_mat_trans_OK <- parm_mat_trans
@@ -47,6 +47,8 @@ mean_degparms <- function(object, random = FALSE, test_log_parms = FALSE, conf.l
degparm_mat_trans <- parm_mat_trans[mean_degparm_names, , drop = FALSE]
degparm_mat_trans_OK <- parm_mat_trans_OK[mean_degparm_names, , drop = FALSE]
+ # fixed in the sense of fixed effects, as this function was
+ # written to supply starting parameters for nlme
fixed <- apply(degparm_mat_trans_OK, 1, mean, na.rm = TRUE)
if (random) {
random <- t(apply(degparm_mat_trans[mean_degparm_names, , drop = FALSE], 2, function(column) column - fixed))

Contact - Imprint