NumConv: Numerical convolution

Description Usage Arguments Value Author(s) See Also Examples

View source: R/NumConv.R

Description

Performs numerical convolution independent of the sampling points but requiring the same timescale of the input and impulse profiles.

Usage

1
NumConv(impulse.matrix, input.matrix, conv.timescale = NULL, explicit.interpolation = 1000)

Arguments

impulse.matrix

matrix of the PK profile after the drug intravenous (i.v.) administration

input.matrix

cumulative in vivo absorption profile

conv.timescale

a timescale of convolution defined either as a whole vector with specific timepoints c(t1,t2,...tN) or two-element vector containing only lower and upper boundery of the required prediction timescale c(lower,upper); in the latter case system creates the time vector based on the parameter explicit.interpolation; if omitted it computes convolution timescale based on the input matrix

explicit.interpolation

sampling accuracy used by the interpolation method to find the same timepoints for input and impulse profiles

Value

Output values are:

$par

convolved time profile based on the original timescale

$par_explicit

provides convolution with the explicit interpolation

Author(s)

Aleksander Mendyk and Sebastian Polak

See Also

NumDeconv,

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
require(Rivivc)
require(graphics)

#i.v. data
data("impulse")
#p.o. PK profile
data("resp")
#in vitro dissolution for correlation purposes
data("input")

#preparing data matrices
input_mtx<-as.matrix(input)
impulse_mtx<-as.matrix(impulse)
resp_mtx<-as.matrix(resp)

#setting interpolation accuracy
accur_explic<-1000

#run convolution
result<-NumConv(impulse_mtx,input_mtx,explicit.interp=accur_explic)

print("Raw results")
print(result$par)

print("Raw results explicit")
print(result$par_explicit)

dev.new()
plot(resp_mtx)
lines(result$par, type="l", col="blue")

dev.new()
plot(resp_mtx)
lines(result$par_explicit, type="l", col="blue")

Rivivc documentation built on May 1, 2019, 6:50 p.m.