NumConv {Rivivc} | R 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 |
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
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")