Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
man
src
vignettes
.Rbuildignore
DESCRIPTION
LICENSE
NAMESPACE
README.md

README.md

r4issactoast

The goal of r4issactoast is to provide users of this package with various functions used in the posts from issactoast.com, so that users can easily reload the functions without copying and paste.

Installation

You can install r4issactoast from github with:

# install.packages("devtools")
devtools::install_github("issactoast/r4issactoast")

List of functions

Here is the list of functions in the packages and related blogpost numbers. You can visit the post by adding the post number after the "www.issactoast.com". For example: www.issactoast.com/100

library(r4issactoast)

mom_gamma()

Calculate the method of moment estimator of gamma distribution parameters for given sample.

my_sample <- rgamma(50, shape = 2, scale = 3)
mom_gamma(my_sample)
#>     k_hat theta_hat 
#>  1.870048  3.015523

mle_gamma()

Calculate the maximum likelihood estimator of gamma distribution parameters for given sample.

my_sample <- rgamma(50, shape = 2, scale = 3)
mle_gamma(my_sample)
#>     k_hat theta_hat 
#>  2.955463  1.761099

newton_method()

Finding root of the function f using f and its derivative.

x_cu <- function(x){x^3}
x_sq <- function(x){3*x^2}
newton_method(f = x_cu, df = x_sq, x_0 = 3)
#> Final value of function: 9.9616e-17
#> [1] 4.63564e-06
You can’t perform that action at this time.