make_pars: Extract pars, fixed and parnames from grids for a given...

View source: R/normIndiv.R

make_parsR Documentation

Extract pars, fixed and parnames from grids for a given condition

Description

Extract pars, fixed and parnames from grids for a given condition

Usage

make_pars(pars, fixed = NULL, est.grid, fix.grid, ID)

Arguments

est.grid

needs condition and ID

fix.grid
ID
est.vec

Examples

pars <- c("k1_A" = 1, "k1_B" = 1, "k2_A" = 2, "k3" = 3, "k4" = 4)
fixed <- c("k2_B" = 2.5)

est.grid <- data.frame(ID = 1:2,
                       condition = c("A", "B"),
                       k1 = c("k1_A", "k1_B"),
                       k2 = c("k2_A", "k2_B"),
                       k3 = c("k3", NA),
                       k4 = c("k4", "k4"),
                       stringsAsFactors = FALSE)
fix.grid <- data.frame(ID = 1:2,
                       condition = c("A", "B"),
                       k3 = c(NA, 3.5),
                       k5 = c(5.1,5.2),
                       k6 = c(6,6),
                       stringsAsFactors = FALSE)
make_pars(pars, fixed, est.grid, fix.grid, 1)
make_pars(pars, fixed, est.grid, fix.grid, 2)

dkaschek/dMod documentation built on April 23, 2024, 5:18 p.m.