SimulateProportion: Performs simulation-based hypothesis tests for one-sample and...

Description Usage Arguments

View source: R/SBI.R

Description

Simulates null distribution and returns simulation-based p-value.

Usage

1
SimulateProportion(n, x, p, alternative, reps)

Arguments

n

sample size. If comparing two proportions, enter each sample size as a vector. (e.g. c(10,15))

x

number of "successes". If comparing two proportions, enter each sample size as a vector. (e.g. c(5,10))

p

Hypothesized value for 1-proportion. Leave blank for two proportions(assumed to be 0).

alternative

Specify alternative hypothesis as either "less", "greater", or "two.sided"

reps

Number of simulations to perform

Returns a histogram of the simulated null distribution. The red line indicates the observed statistic. The simulation-based p-value is also returned. Andrew Sage

##—- Should be DIRECTLY executable !! —- ##– ==> Define data, use random, ##– or do help(data=index) for the standard data sets.

## The function is currently defined as function (x) ~kwd1 ~kwd2


AndrewjSage/SBI documentation built on March 29, 2020, 4:22 a.m.