logdensity_deriv1 | R Documentation |
Based on a "LogConcaveDESM" object, evaluates and plots the first derivative of the logarithm of the (penalized) log-concave score matching density estimate.
evaluate_logdensity_deriv1(scorematching_logconcave, newx)
evaluate_logdensity_deriv1_bounded(scorematching_logconcave, newx)
evaluate_logdensity_deriv1_R(scorematching_logconcave, newx)
evaluate_logdensity_deriv1_ninfb(scorematching_logconcave, newx)
evaluate_logdensity_deriv1_ainf(scorematching_logconcave, newx)
plot_logdensity_deriv1(
scorematching_logconcave,
plot_domain,
plot_points_cnt = 100
)
scorematching_logconcave |
An object of class "LogConcaveDESM",
usually the output of |
newx |
A numeric vector of real numbers at which the first derivative of the logarithm of the (penalized) log-concave score matching density estimate should be evaluated. #' @details The functions The function |
plot_domain |
A numeric vector to indicate the domain of the plot. |
plot_points_cnt |
A numeric to indicate the number of points for evaluating and plotting.
Default is |
A data frame with the first column being the sorted newx
and
the second column being the corresponding first derivative values of the logarithm of
the (penalized) log-concave score matching density estimate.
A ggplot2 plot of the first derivative of the logarithm of the (penalized) log-concave score matching density estimate over the specified plot domain.
set.seed(1119)
N <- 100
data <- rnorm(N)
domain <- c(-5, 5)
result <- lcd_scorematching(data, domain, penalty_param = 1e-10)
# evaluationn
evaluate_logdensity_deriv1(scorematching_logconcave = result,
newx = seq(result$domain[1], result$domain[2], 0.01))
# plot
plot_logdensity_deriv1(scorematching_logconcave = result,
plot_domain = result$domain, plot_points_cnt = 500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.