Skip to content

Commit

Permalink
added examples and references to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rajitachandak committed Mar 20, 2024
1 parent f27eeab commit 61e9188
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
11 changes: 11 additions & 0 deletions R/lpcde/R/lpcde.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@
#' \code{\link{plot.lpcde}}, \code{\link{print.lpcde}},
#' \code{\link{summary.lpcde}}, \code{\link{vcov.lpcde}}
#'
#'
#' @examples
#' #Density estimation example
#' n=500
#' x_data = matrix(rnorm(n, mean=0, sd=1))
#' y_data = matrix(rnorm(n, mean=x_data, sd=1))
#' y_grid = seq(from=-1, to=1, length.out=5)
#' model1 = lpcde::lpcde(x_data=x_data, y_data=y_data, y_grid=y_grid, x=0, bw=0.5)
#' #summary of estimation
#' summary(model1)
#'
#' @references
#' \insertRef{bernoulli}{lpcde}\cr
#' \insertRef{JASA}{lpcde}\cr
Expand Down
11 changes: 11 additions & 0 deletions R/lpcde/man/lpcde.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions R/lpcde/tests/testthat/test-lpbwcde.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ test_that("lpbwcde default output", {
coef(model1)
expect_equal(model1$opt$ng, 19)

expect_error(vcov(model1), regexp="The vcov method does not support \"lpbwcde\" objects.")
expect_error(confint(model1), regexp="The confint method does not support \"lpbwcde\" objects.")

model1 = lpbwcde(x_data=x_data, y_data=y_data, x=0, bw_type = "mse-rot")
expect_equal(model1$opt$bw_type, "mse-rot")
model1 = lpbwcde(x_data=x_data, y_data=y_data, y_grid=y_grid, x=0, bw_type = "mse-dpi")
Expand Down
Binary file modified R/lpcde_0.1.2.pdf
Binary file not shown.

0 comments on commit 61e9188

Please sign in to comment.