NumConv: Numerical convolution

View source: R/NumConv.R

NumConvR Documentation

Numerical convolution

Description

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

Usage

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


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 April 24, 2022, 1:05 a.m.