The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
The sicegar package provides a helpful function that can generate plots of the fitted models. This function is built on top of the ggplot2 plot library.
To demonstrate figure generation, we first generate simulated sigmoidal and double-sigmoidal data and fit the respective models to these datasets.
# simulate sigmoidal data
<- seq(3, 24, 0.5)
time
<- 0.1
noise_parameter <- runif(n = length(time), min = 0, max = 1) * noise_parameter
intensity_noise <- sigmoidalFitFormula(time, maximum = 4, slope = 1, midPoint = 8)
intensity <- intensity + intensity_noise
intensity <- data.frame(intensity = intensity, time = time)
dataInputSigmoidal
# simulate double-sigmoidal data
<- 0.2
noise_parameter <- runif(n = length(time),min = 0,max = 1) * noise_parameter
intensity_noise <- doublesigmoidalFitFormula(time,
intensity finalAsymptoteIntensityRatio = .3,
maximum = 4,
slope1 = 1,
midPoint1Param = 7,
slope2 = 1,
midPointDistanceParam = 8)
<- intensity + intensity_noise
intensity <- data.frame(intensity = intensity, time = time)
dataInputDoubleSigmoidal
# fit models to both datasets
<- fitAndCategorize(dataInput = dataInputSigmoidal)
fitObj_sm <- fitAndCategorize(dataInput = dataInputDoubleSigmoidal) fitObj_dsm
Now we can plot the results using the function figureModelCurves()
. This function returns a ggplot2 plot that can be saved or displayed directly. The function has several different options.
First, we can plot only the raw input data.
# sigmoidal raw data only
figureModelCurves(dataInput = fitObj_sm$normalizedInput)
# double-sigmoidal raw data only
figureModelCurves(dataInput = fitObj_dsm$normalizedInput)
Second, we can plot the input data with the fitted lines.
# sigmoidal fit
figureModelCurves(dataInput = fitObj_sm$normalizedInput,
sigmoidalFitVector = fitObj_sm$sigmoidalModel)
# double-sigmoidal fit
figureModelCurves(dataInput = fitObj_dsm$normalizedInput,
doubleSigmoidalFitVector = fitObj_dsm$doubleSigmoidalModel)
Third, we can additionally visualize the parameter estimates, by setting showParameterRelatedLines = TRUE
.
# sigmoidal fit with parameter related lines
figureModelCurves(dataInput = fitObj_sm$normalizedInput,
sigmoidalFitVector = fitObj_sm$sigmoidalModel,
showParameterRelatedLines = TRUE)
# double-sigmoidal fit with parameter related lines
figureModelCurves(dataInput = fitObj_dsm$normalizedInput,
doubleSigmoidalFitVector = fitObj_dsm$doubleSigmoidalModel,
showParameterRelatedLines = TRUE)
Note that the last example only works for models that had additional parameters calculated using parameterCalculation()
. This is done automatically when fitting with fitFunction()
, but needs to be done manually when fitting with multipleFitFunction()
.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.