hw2.sim.849: A function to do question 2 from homework 2 in STAT 849

Description Usage Arguments

View source: R/hw2.sim.849.R

Description

This function simulates data from a distribution and performs a one sample T-test then outputs coverage probability and type 1 error rate

Usage

1
2
hw2.sim.849(h0.mean, num.samp, num.reps, samp.dist, times.scalar = FALSE,
  alpha = 0.05, ...)

Arguments

h0.mean

The mean under H0

num.samp

The number of samples in each repetition

num.reps

The number of repetitions

samp.dist

The distribution to sample from, either "normal", "chisq", or "t"

times.scalar

This is added for part g. If true, the function randomly samples a 5 or 10 for each repetition and multiples that by the first observation in that repetition's sample.

alpha

Alpha level for test

...

Additional options to specify for the sampling distribution


JMMaronge/jmm.funcs documentation built on May 7, 2019, 10:12 a.m.