title: "Tyler Pardun - Lab Functions" author: "Tyler Pardun" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Tyler Pardun - Lab Functions} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} %\VignetteEngine{rmarkdown::render}
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(MATH4753pard0003)
In this package, 5 functions are defined from previous labs and examples are shown below.
MATH4753pard0003::mymult(iter=100,n=10, p=c(1,1,1,1)/4)
This function inputs a vector of an arbitrary number of categories with a specified number of iterations and a size n. This function will graph the relative frequencies of n random samples and creates a histogram out of it.
MATH4753pard0003::myncurve(a=10, mu=3, sigma=1)
This function will input an arbitrary number with a specified mean and standard deviation. The output will be a normal distribution with the probability of x is less than or equal to that specifed number.
MATH4753pard0003::myquadratic(x=100)
This function take an input X value and will return the yhat value from the equation specified in Lab 4.
MATH4753pard0003::mycltp(n=20,iter=10000,lambda=10)
This function takes a sample size of n, an abirtrary number of iterations and a specifed lambda value for a Poisson distribution. The output consits of a histogram of the density of the discrete values, a barplot of the sampled y values and a probability function of all possible y values.
set.seed(68) sam=rnorm(20,mean=10,sd=4) MATH4753pard0003::myboot2(iter=10000,x=sam,fun="mean",alpha=0.05)
This function takes a specified distriubtion and will perform a bootstrap sample to it to obtain the lower and upper bounds of a specified confidence interval.
MATH4753pard0003::myci(x=rnorm(30,mean=10,sd=3))
This function takes a specified distriubtion and will compute the lower and upper bounds of a the 95% confidence interval.
y=c(10,12,13,15,12,11,10) MATH4753pard0003::mymlnorm(y,color='black')
This function produces a 3 panel plot for the poisson distribution.
set.seed(55);x1=rnorm(30,mean=25, sd=5) MATH4753pard0003::bootpval(x=x1,mu=22,test="two")
This function produces a histogram with accepted and rejected regions from a bootstrap resample from a given sample and a given null hypothesis about the mean of the sample.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.