BP_FitMLCompactness {BoneProfileR} | R Documentation |
Estimation of the likelihood of a bone section
Description
Estimation of the model of compactness of a bone section.
The two-steps analysis performs first a quasi-Newton method, then a Bayesian MCMC and finally again a quasi-Newton method.
It generally ensures that global minimum is found. On the other hand, it doubles the time to complete.
Usage
BP_FitMLCompactness(
bone,
fitted.parameters = c(P = 0.5, S = 0.05, Min = 0.001, Max = 0.999),
priors = NULL,
fixed.parameters = c(K1 = 1, K2 = 1),
twosteps = TRUE,
replicates.CI = 10000,
analysis = 1,
silent = FALSE
)
Arguments
bone |
The bone image to be used |
fitted.parameters |
Parameters of the model to be fitted |
priors |
Priors used for intermediate estimations |
fixed.parameters |
Fixed parameters of the model |
twosteps |
Does a 2-steps analysis be performed? |
replicates.CI |
Number of replicates to estimate confidence interval |
analysis |
Name or rank of analysis |
silent |
Should information be shown? |
Details
BP_FitMLCompactness estimates likelihood of model of a bone section
Value
The -Ln L
Author(s)
Marc Girondot marc.girondot@gmail.com
See Also
Other BoneProfileR:
BP_AutoFit()
,
BP_ChooseBackground()
,
BP_ChooseCenter()
,
BP_ChooseForeground()
,
BP_DetectBackground()
,
BP_DetectCenters()
,
BP_DetectForeground()
,
BP_DuplicateAnalysis()
,
BP_EstimateCompactness()
,
BP_FitBayesianCompactness()
,
BP_FitMLRadialCompactness()
,
BP_GetFittedParameters()
,
BP_ListAnalyses()
,
BP_LnLCompactness()
,
BP_OpenImage()
,
BP_Report()
,
Erinaceus_europaeus
,
plot.BoneProfileR()
,
summary.BoneProfileR()
Examples
## Not run:
# Not run:
library(BoneProfileR)
bone <- BP_OpenImage()
# or, to use the package imager to open a tiff image
bone <- BP_OpenImage(ijtiff=TRUE)
library(BoneProfileR)
path_Hedgehog <- system.file("extdata", "Erinaceus_europaeus_fem_2-1_small.png",
package = "BoneProfileR")
bone <- BP_OpenImage(file=path_Hedgehog)
bone <- BP_DetectBackground(bone=bone, analysis="logistic")
bone <- BP_DetectForeground(bone=bone, analysis="logistic")
bone <- BP_DetectCenters(bone=bone, analysis="logistic")
bone <- BP_EstimateCompactness(bone, analysis="logistic")
plot(bone, type="mineralized", show.grid=FALSE)
plot(bone, type="unmineralized", show.grid=FALSE)
plot(bone, type="section", show.grid=FALSE)
bone <- BP_FitMLCompactness(bone, analysis="logistic", twosteps=TRUE)
BP_GetFittedParameters(bone)
plot(bone)
plot(bone, type="observations")
plot(bone, type="observations+model", analysis=1)
bone <- BP_DuplicateAnalysis(bone, from="logistic", to="flexit")
fittedpar <- BP_GetFittedParameters(bone, analysis="logistic")
bone <- BP_DuplicateAnalysis(bone, from="logistic", to="flexit")
BP_ListAnalyses(bone)
bone <- BP_FitMLCompactness(bone,
fitted.parameters=c(fittedpar, K1=1, K2=1),
fixed.parameters=NULL, analysis="flexit", twosteps=TRUE)
compare_AIC(Logistic=BP_GetFittedParameters(bone, analysis="logistic", alloptim=TRUE),
Flexit=BP_GetFittedParameters(bone, analysis="flexit", alloptim=TRUE))
out4p <- plot(bone, type="observations+model", analysis="logistic")
out6p <- plot(bone, type="observations+model", analysis="flexit")
## End(Not run)