finterp: Formula Interpreter

Description Usage Arguments Value Author(s) See Also Examples

View source: R/finterp.r

Description

finterp translates a model formula into a function of the unknown parameters or of a vector of them. Such language formulae can either be in Wilkinson and Rogers notation or be expressions containing both known (existing) covariates and unknown (not existing) parameters. In the latter, factor variables cannot be used and parameters must be scalars.

The covariates in the formula are sought in the environment or in the data object provided. If the data object has class, repeated or response, then the key words, times will use the response times from the data object as a covariate, individuals will use the index for individuals as a factor covariate, and nesting the index for nesting as a factor covariate. The latter two only work for W&R notation.

Note that, in parameter displays, formulae in Wilkinson and Rogers notation use variable names whereas those with unknowns use the names of these parameters, as given in the formulae, and that the meaning of operators (*, /, :, etc.) is different in the two cases.

Usage

1
2
3
4
5
finterp(.z, ...)
## Default S3 method:
finterp(.z, .envir=parent.frame(), .formula=FALSE, .vector=TRUE,
	.args=NULL, .start=1, .name=NULL, .expand=TRUE, .intercept=TRUE,
	.old=NULL, .response=FALSE, ...)

Arguments

.z

A model formula beginning with ~, either in Wilkinson and Rogers notation or containing unknown parameters. If it contains unknown parameters, it can have several lines so that, for example, local variables can be assigned temporary values. In this case, enclose the formula in curly brackets.

.envir

The environment in which the formula is to be interpreted or a data object of class, repeated, tccov, or tvcov.

.formula

If TRUE and the formula is in Wilkinson and Rogers notation, just returns the formula.

.vector

If FALSE and the formula contains unknown parameters, the function returned has them as separate arguments. If TRUE, it has one argument, the unknowns as a vector, unless certain parameter names are specified in .args. Always TRUE if .envir is a data object.

.args

If .vector is TRUE, names of parameters that are to be function arguments and not included in the vector.

.start

The starting index value of the parameter vector in the function returned when .vector is TRUE.

.name

Character string giving the name of the data object specified by .envir. Ignored unless the latter is such an object and only necessary when finterp is called within other functions.

.expand

If TRUE, expand functions with only time-constant covariates to return one value per observation instead of one value per individual. Ignored unless .envir is an object of class, repeated.

.intercept

If W&R notation is supplied and .intercept=F, a model function without intercept is returned.

.old

The name of an existing object of class formulafn which has common parameters with the one being created, or a list of such objects. Only used if .vector=TRUE. The value of .start should ensure that there is no conflict in indexing the vector.

.response

If TRUE, any response variable can be used in the function. If FALSE, checks are made that the response is not also used as a covariate.

...

Arguments passed to other functions.

Value

A function, of class formulafn, of the unknown parameters or of a vector of them is returned. Its attributes give the formula supplied, the model function produced, the covariate names, the parameter names, and the range of values of the index of the parameter vector. If formula is TRUE and a Wilkinson and Rogers formula was supplied, it is simply returned instead of creating a function.

Author(s)

J.K. Lindsey

See Also

FormulaMethods, covariates, fnenvir, formula, model, parameters

Examples

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
x1 <- rpois(20,2)
x2 <- rnorm(20)
#
# Wilkinson and Rogers formula with three parameters
fn1 <- finterp(~x1+x2)
fn1
fn1(rep(2,3))
# the same formula with unknowns
fn2 <- finterp(~b0+b1*x1+b2*x2)
fn2
fn2(rep(2,3))
#
# nonlinear formulae with unknowns
# log link
fn2a <- finterp(~exp(b0+b1*x1+b2*x2))
fn2a
fn2a(rep(0.2,3))
# parameters common to two functions
fn2b <- finterp(~c0+c1*exp(b0+b1*x1+b2*x2), .old=fn2a, .start=4)
fn2b
# function returned also depends on values of another function
fn2c <- finterp(~fn2+c1*exp(b0+b1*x1+b2*x2), .old=fn2a,
	.start=4, .args="fn2")
fn2c
args(fn2c)
fn2c(rep(0.2,4),fn2(rep(2,3)))
#
# compartment model
times <- 1:20
# exp() parameters to ensure that they are positive
fn3 <- finterp(~exp(absorption-volume)/(exp(absorption)-
	exp(elimination))*(exp(-exp(elimination)*times)-
	exp(-exp(absorption)*times)))
fn3
fn3(log(c(0.3,3,0.2)))
# a more efficient way
# (note that parameters do not appear in the same order)
form <- ~{
	ka <- exp(absorption)
	ke <- exp(elimination)
	ka*exp(-volume)/(ka-ke)*(exp(-ke*times)-exp(-ka*times))}
fn3a <- finterp(form)
fn3a(log(c(0.3,0.2,3)))
#
# Poisson density
y <- rpois(20,5)
fn4 <- finterp(~mu^y*exp(-mu)/gamma(y+1))
fn4
fn4(5)
dpois(y,5)
#
# Poisson likelihood
# mean parameter
fn5 <- finterp(~-y*log(mu)+mu+lgamma(y+1),.vector=FALSE)
fn5
likefn1 <- function(p) sum(fn5(mu=p))
nlm(likefn1,p=1)
mean(y)
# canonical parameter
fn5a <- finterp(~-y*theta+exp(theta)+lgamma(y+1),.vector=FALSE)
fn5a
likefn1a <- function(p) sum(fn5a(theta=p))
nlm(likefn1a,p=1)
#
# likelihood for Poisson log linear regression
y <- rpois(20,fn2a(c(0.2,1,0.4)))
nlm(likefn1,p=1)
mean(y)
likefn2 <- function(p) sum(fn5(mu=fn2a(p)))
nlm(likefn2,p=c(1,0,0))
# or
likefn2a <- function(p) sum(fn5a(theta=fn2(p)))
nlm(likefn2a,p=c(1,0,0))
#
# likelihood for Poisson nonlinear regression
y <- rpois(20,fn3(log(c(3,0.3,0.2))))
nlm(likefn1,p=1)
mean(y)
likefn3 <- function(p) sum(fn5(mu=fn3(p)))
nlm(likefn3,p=log(c(1,0.4,0.1)))
#
# envir as data objects
y <- matrix(rnorm(20),ncol=5)
y[3,3] <- y[2,2] <- NA
x1 <- 1:4
x2 <- c("a","b","c","d")
resp <- restovec(y)
xx <- tcctomat(x1)
xx2 <- tcctomat(data.frame(x1,x2))
z1 <- matrix(rnorm(20),ncol=5)
z2 <- matrix(rnorm(20),ncol=5)
z3 <- matrix(rnorm(20),ncol=5)
zz <- tvctomat(z1)
zz <- tvctomat(z2,old=zz)
reps <- rmna(resp, ccov=xx, tvcov=zz)
reps2 <- rmna(resp, ccov=xx2, tvcov=zz)
rm(y, x1, x2 , z1, z2)
#
# repeated objects
#
# time-constant covariates
# Wilkinson and Rogers notation
form1 <- ~x1
print(fn1 <- finterp(form1, .envir=reps))
fn1(2:3)
print(fn1a <- finterp(form1, .envir=xx))
fn1a(2:3)
form1b <- ~x1+x2
print(fn1b <- finterp(form1b, .envir=reps2))
fn1b(2:6)
print(fn1c <- finterp(form1b, .envir=xx2))
fn1c(2:6)
# with unknown parameters
form2 <- ~a+b*x1
print(fn2 <- finterp(form2, .envir=reps))
fn2(2:3)
print(fn2a <- finterp(form2, .envir=xx))
fn2a(2:3)
#
# time-varying covariates
# Wilkinson and Rogers notation
form3 <- ~z1+z2
print(fn3 <- finterp(form3, .envir=reps))
fn3(2:4)
print(fn3a <- finterp(form3, .envir=zz))
fn3a(2:4)
# with unknown parameters
form4 <- ~a+b*z1+c*z2
print(fn4 <- finterp(form4, .envir=reps))
fn4(2:4)
print(fn4a <- finterp(form4, .envir=zz))
fn4a(2:4)
#
# note: lengths of x1 and z2 differ
# Wilkinson and Rogers notation
form5 <- ~x1+z2
print(fn5 <- finterp(form5, .envir=reps))
fn5(2:4)
# with unknown parameters
form6 <- ~a+b*x1+c*z2
print(fn6 <- finterp(form6, .envir=reps))
fn6(2:4)
#
# with times
# Wilkinson and Rogers notation
form7 <- ~x1+z2+times
print(fn7 <- finterp(form7, .envir=reps))
fn7(2:5)
form7a <- ~x1+x2+z2+times
print(fn7a <- finterp(form7a, .envir=reps2))
fn7a(2:8)
# with unknown parameters
form8 <- ~a+b*x1+c*z2+e*times
print(fn8 <- finterp(form8, .envir=reps))
fn8(2:5)
#
# with a variable not in the data object
form9 <- ~a+b*z1+c*z2+e*z3
print(fn9 <- finterp(form9, .envir=reps))
fn9(2:5)
# z3 assumed to be an unknown parameter:
fn9(2:6)
#
# multiline formula
form10 <- ~{
	tmp <- exp(b)
	a+tmp*z1+c*z2+d*times}
print(fn10 <- finterp(form10, .envir=reps))
fn10(2:5)

Example output

Attaching package: 'rmutil'

The following object is masked from 'package:stats':

    nobs


formula:
~x1 + x2
attr(,".Environment")
<environment: R_GlobalEnv>

covariates:
x1  x2  

parameters:
p[1]  p[2]  p[3]  

 [1]  8.859721  5.666863  9.262549  3.214571  6.705328 11.088626  5.529774
 [8] 10.192708  6.964560  5.598967 10.171324  5.563623 -4.011329  6.113353
[15]  7.026125 10.264561  6.602376  8.913638 19.565597  7.829881

formula:
~b0 + b1 * x1 + b2 * x2
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
.p[1] + .p[2] * x1 + .p[3] * x2

covariates:
x1  x2  

parameters:
b0  b1  b2  

 [1]  8.859721  5.666863  9.262549  3.214571  6.705328 11.088626  5.529774
 [8] 10.192708  6.964560  5.598967 10.171324  5.563623 -4.011329  6.113353
[15]  7.026125 10.264561  6.602376  8.913638 19.565597  7.829881

formula:
~exp(b0 + b1 * x1 + b2 * x2)
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
exp(.p[1] + .p[2] * x1 + .p[3] * x2)

covariates:
x1  x2  

parameters:
b0  b1  b2  

 [1] 2.4253410 1.7624173 2.5250350 1.3791358 1.9552788 3.0309092 1.7384213
 [8] 2.7711732 2.0066287 1.7504916 2.7652537 1.7443156 0.6695611 1.8428906
[15] 2.0190205 2.7911566 1.9352521 2.4384531 7.0749453 2.1880005

formula:
~c0 + c1 * exp(b0 + b1 * x1 + b2 * x2)
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
.p[4] + .p[5] * exp(.p[1] + .p[2] * x1 + .p[3] * x2)

covariates:
x1  x2  

new parameters:
c0  c1  

common parameters:
b0  b1  b2  


formula:
~fn2 + c1 * exp(b0 + b1 * x1 + b2 * x2)
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
fn2 + .p[4] * exp(.p[1] + .p[2] * x1 + .p[3] * x2)

covariates:
x1  x2  

new parameters:
c1  

common parameters:
b0  b1  b2  

function (.p, fn2) 
NULL
 [1]  9.344789  6.019347  9.767556  3.490398  7.096384 11.694808  5.877458
 [8] 10.746942  7.365886  5.949065 10.724375  5.912486 -3.877417  6.481932
[15]  7.429929 10.822792  6.989427  9.401329 20.980586  8.267481

formula:
~exp(absorption - volume)/(exp(absorption) - exp(elimination)) * 
    (exp(-exp(elimination) * times) - exp(-exp(absorption) * 
        times))
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
exp(.p[1] - .p[2])/(exp(.p[1]) - exp(.p[3])) * (exp(-exp(.p[3]) * 
    .p[4]) - exp(-exp(.p[1]) * .p[4]))

parameters:
absorption  volume  elimination  times  

[1] NA
[1] NA

formula:
~mu^y * exp(-mu)/gamma(y + 1)
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
.p[1]^y * exp(-.p[1])/gamma(y + 1)

covariates:
y  

parameters:
mu  

 [1] 0.175467370 0.175467370 0.175467370 0.175467370 0.008242177 0.175467370
 [7] 0.084224337 0.175467370 0.140373896 0.175467370 0.140373896 0.033689735
[13] 0.084224337 0.175467370 0.175467370 0.065278039 0.146222808 0.018132789
[19] 0.175467370 0.175467370
 [1] 0.175467370 0.175467370 0.175467370 0.175467370 0.008242177 0.175467370
 [7] 0.084224337 0.175467370 0.140373896 0.175467370 0.140373896 0.033689735
[13] 0.084224337 0.175467370 0.175467370 0.065278039 0.146222808 0.018132789
[19] 0.175467370 0.175467370

formula:
~-y * log(mu) + mu + lgamma(y + 1)
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
-y * log(mu) + mu + lgamma(y + 1)

covariates:
y  

parameters:
mu  

$minimum
[1] 44.68586

$estimate
[1] 4.699998

$gradient
[1] 2.131629e-07

$code
[1] 1

$iterations
[1] 11

Warning messages:
1: In log(mu) : NaNs produced
2: In nlm(likefn1, p = 1) : NA/Inf replaced by maximum positive value
3: In log(mu) : NaNs produced
4: In nlm(likefn1, p = 1) : NA/Inf replaced by maximum positive value
[1] 4.7

formula:
~-y * theta + exp(theta) + lgamma(y + 1)
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
-y * theta + exp(theta) + lgamma(y + 1)

covariates:
y  

parameters:
theta  

$minimum
[1] 44.68586

$estimate
[1] 1.547562

$gradient
[1] -1.285583e-07

$code
[1] 1

$iterations
[1] 6

$minimum
[1] 7255.767

$estimate
[1] 155

$gradient
[1] 1.372457e-05

$code
[1] 1

$iterations
[1] 17

There were 16 warnings (use warnings() to see them)
[1] 155
$minimum
[1] 51.09394

$estimate
[1] 0.1952470 1.0081281 0.3685658

$gradient
[1] -0.0001978182 -0.0013866824 -0.0003753334

$code
[1] 2

$iterations
[1] 20

Warning messages:
1: In nlm(likefn2, p = c(1, 0, 0)) :
  NA/Inf replaced by maximum positive value
2: In nlm(likefn2, p = c(1, 0, 0)) :
  NA/Inf replaced by maximum positive value
$minimum
[1] 51.09394

$estimate
[1] 0.1952470 1.0081281 0.3685658

$gradient
[1] -0.0001978182 -0.0013866824 -0.0003753334

$code
[1] 2

$iterations
[1] 20

Warning messages:
1: In nlm(likefn2a, p = c(1, 0, 0)) :
  NA/Inf replaced by maximum positive value
2: In nlm(likefn2a, p = c(1, 0, 0)) :
  NA/Inf replaced by maximum positive value
Warning message:
In rpois(20, fn3(log(c(3, 0.3, 0.2)))) : NAs produced
$minimum
[1] 1.797693e+308

$estimate
[1] 1

$gradient
[1] 0

$code
[1] 1

$iterations
[1] 0

Warning messages:
1: In nlm(likefn1, p = 1) : NA/Inf replaced by maximum positive value
2: In nlm(likefn1, p = 1) : NA/Inf replaced by maximum positive value
[1] NA
$minimum
[1] 1.797693e+308

$estimate
[1]  0.0000000 -0.9162907 -2.3025851

$gradient
[1] 0 0 0

$code
[1] 1

$iterations
[1] 0

Warning messages:
1: In nlm(likefn3, p = log(c(1, 0.4, 0.1))) :
  NA/Inf replaced by maximum positive value
2: In nlm(likefn3, p = log(c(1, 0.4, 0.1))) :
  NA/Inf replaced by maximum positive value
3: In nlm(likefn3, p = log(c(1, 0.4, 0.1))) :
  NA/Inf replaced by maximum positive value
4: In nlm(likefn3, p = log(c(1, 0.4, 0.1))) :
  NA/Inf replaced by maximum positive value

formula:
~x1
attr(,".Environment")
<environment: R_GlobalEnv>

covariates:
x1  

parameters:
p[1]  p[2]  

 [1]  5  5  5  5  5  8  8  8  8 11 11 11 11 14 14 14 14 14

formula:
~x1
attr(,".Environment")
<environment: R_GlobalEnv>

covariates:
x1  

parameters:
p[1]  p[2]  

[1]  5  8 11 14

formula:
~x1 + x2
attr(,".Environment")
<environment: R_GlobalEnv>

covariates:
x1  x2  

parameters:
p[1]  p[2]  p[3]  p[4]  p[5]  

 [1]  5  5  5  5  5 12 12 12 12 16 16 16 16 20 20 20 20 20

formula:
~x1 + x2
attr(,".Environment")
<environment: R_GlobalEnv>

covariates:
x1  x2  

parameters:
p[1]  p[2]  p[3]  p[4]  p[5]  

[1]  5 12 16 20

formula:
~a + b * x1
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
.p[1] + .p[2] * reps$ccov$ccov[, 1][.i]

covariates:
x1  

parameters:
a  b  

 [1]  5  5  5  5  5  8  8  8  8 11 11 11 11 14 14 14 14 14

formula:
~a + b * x1
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
.p[1] + .p[2] * xx$ccov[, 1]

covariates:
x1  

parameters:
a  b  

[1]  5  8 11 14

formula:
~z1 + z2
attr(,".Environment")
<environment: R_GlobalEnv>

covariates:
z1  z2  

parameters:
p[1]  p[2]  p[3]  

 [1]   8.6130129   2.9449202   4.9451641   5.3472530   4.2963027   6.3975919
 [7]  -0.3594931   3.1309390   3.5164785 -10.8796098   7.8651199   9.3294535
[13]   6.9049831   2.2322942   3.1276099   5.8033537   1.6074279   3.7275297

formula:
~z1 + z2
attr(,".Environment")
<environment: R_GlobalEnv>

covariates:
z1  z2  

parameters:
p[1]  p[2]  p[3]  

 [1]   8.6130129   2.9449202   4.9451641   5.3472530   4.2963027   6.3975919
 [7]   1.3370585  -0.3594931   3.1309390   3.5164785 -10.8796098   7.8651199
[13]   0.4796088   9.3294535   6.9049831   2.2322942   3.1276099   5.8033537
[19]   1.6074279   3.7275297

formula:
~a + b * z1 + c * z2
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
.p[1] + .p[2] * reps$tvcov$tvcov[, 1] + .p[3] * reps$tvcov$tvcov[, 
    2]

covariates:
z1  z2  

parameters:
a  b  c  

 [1]   8.6130129   2.9449202   4.9451641   5.3472530   4.2963027   6.3975919
 [7]  -0.3594931   3.1309390   3.5164785 -10.8796098   7.8651199   9.3294535
[13]   6.9049831   2.2322942   3.1276099   5.8033537   1.6074279   3.7275297

formula:
~a + b * z1 + c * z2
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
.p[1] + .p[2] * zz$tvcov[, 1] + .p[3] * zz$tvcov[, 
    2]

covariates:
z1  z2  

parameters:
a  b  c  

 [1]   8.6130129   2.9449202   4.9451641   5.3472530   4.2963027   6.3975919
 [7]   1.3370585  -0.3594931   3.1309390   3.5164785 -10.8796098   7.8651199
[13]   0.4796088   9.3294535   6.9049831   2.2322942   3.1276099   5.8033537
[19]   1.6074279   3.7275297

formula:
~x1 + z2
attr(,".Environment")
<environment: R_GlobalEnv>

covariates:
x1  z2  

parameters:
p[1]  p[2]  p[3]  

 [1]  7.758306  5.394042  1.667589  2.911249  8.672290 12.473829  9.588206
 [8]  6.991477  7.389657  2.049374 18.516356 11.753487 14.056609 14.111617
[15] 15.440346 10.636855 11.707794 14.161895

formula:
~a + b * x1 + c * z2
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
.p[1] + .p[2] * reps$ccov$ccov[, 1][.i] + .p[3] * 
    reps$tvcov$tvcov[, 2]

covariates:
x1  z2  

parameters:
a  b  c  

 [1]  7.758306  5.394042  1.667589  2.911249  8.672290 12.473829  9.588206
 [8]  6.991477  7.389657  2.049374 18.516356 11.753487 14.056609 14.111617
[15] 15.440346 10.636855 11.707794 14.161895

formula:
~x1 + z2 + times
attr(,".Environment")
<environment: R_GlobalEnv>

covariates:
x1  z2  times  

parameters:
p[1]  p[2]  p[3]  p[4]  

 [1] 12.758306 15.394042 16.667589 22.911249 33.672290 17.473829 24.588206
 [8] 26.991477 32.389657  7.049374 28.516356 31.753487 39.056609 19.111617
[15] 25.440346 25.636855 31.707794 39.161895

formula:
~x1 + x2 + z2 + times
attr(,".Environment")
<environment: R_GlobalEnv>

covariates:
x1  x2  z2  times  

parameters:
p[1]  p[2]  p[3]  p[4]  p[5]  p[6]  p[7]  

 [1] 17.827036 21.689574 23.168280 33.344685 51.426508 27.829200 38.779360
 [8] 42.235085 50.931900  8.336405 45.153622 49.318602 61.349065 28.195330
[15] 38.520606 38.114497 47.988640 60.283316

formula:
~a + b * x1 + c * z2 + e * times
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
.p[1] + .p[2] * reps$ccov$ccov[, 1][.i] + .p[3] * 
    reps$tvcov$tvcov[, 2] + .p[4] * reps$response$times

covariates:
x1  z2  times  

parameters:
a  b  c  e  

 [1] 12.758306 15.394042 16.667589 22.911249 33.672290 17.473829 24.588206
 [8] 26.991477 32.389657  7.049374 28.516356 31.753487 39.056609 19.111617
[15] 25.440346 25.636855 31.707794 39.161895

formula:
~a + b * z1 + c * z2 + e * z3
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
.p[1] + .p[2] * reps$tvcov$tvcov[, 1] + .p[3] * reps$tvcov$tvcov[, 
    2] + .p[4] * .p[5]

covariates:
z1  z2  

parameters:
a  b  c  e  z3  

 [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [1] 38.61301 32.94492 34.94516 35.34725 34.29630 36.39759 29.64051 33.13094
 [9] 33.51648 19.12039 37.86512 39.32945 36.90498 32.23229 33.12761 35.80335
[17] 31.60743 33.72753

formula:
~{
    tmp <- exp(b)
    a + tmp * z1 + c * z2 + d * times
}
attr(,".Environment")
<environment: R_GlobalEnv>

model function:
{
    tmp <- exp(.p[1])
    .p[2] + tmp * reps$tvcov$tvcov[, 1] + .p[3] * reps$tvcov$tvcov[, 
        2] + .p[4] * reps$response$times
}

covariates:
z1  z2  times  

parameters:
b  a  c  d  

 [1]  20.252521  14.750865  30.129374  34.300229  28.283207  12.286056
 [7]   9.864949  27.261011  32.628058 -10.627787  16.449331  39.950216
[13]  35.609189   8.408847  13.670071  32.288075  25.386628  32.018083

rmutil documentation built on May 27, 2018, 5:03 p.m.

Related to finterp in rmutil...