Statistics 5421 (Geyer, Fall 2021) Examples

  • The R Statistical Computer Language
    • An Introduction to R and Rweb
    • Probability Distributions in R

  • Some R scripts. For a file foo.R the following command run outside R from the operating system command line

    R CMD BATCH --vanilla foo.R

    produces a file foo.Rout that has all the results (whatever R would print if every command in the file were typed in to R).

    • binom.R and binom.Rout statistical inference for binomial distributions (section 1.4 in Agresti). This file has been redone in R markdown to serve as an R markdown example too. That is found in the Course Notes section of this web site.
    • coverage.R and coverage.Rout and coverage.pdf coverage of confidence interval for binomial distributions.
    • The former multi-simple.R and multi-simple.Rout have been moved to the Course Notes section.
    • The former files
      • multi.R,
      • likelihood.R,
      • likelihood-easier.R,
      • likelihood-factory.R,
      and their corresponding output (extension Rout) files have been combined in a new handout on Likelihood Computation found in the course notes section.
    • mcmc.R and mcmc.Rout and mcmc.pdf Bayesian inference via Markov chain Monte Carlo (section 1.6 in Agresti)
    • mcmc-too.R and mcmc-too.Rout and mcmc-too.pdf more Bayesian inference via Markov chain Monte Carlo (section 1.6 in Agresti)
    • expfam-samp.R and expfam-samp.Rout some examples that go with exponential families, now obsolete, see the handout on exponential families, which has many more examples.
    • step.R and step.Rout using the R function step
    • s3-try3.R and s3-try3.Rout using the R function glmbb in the CRAN package glmbb that uses the branch and bound algorithm to find all models having criterion (AIC, BIC, or AICc) less than the minimum value of the criterion plus a specified cutoff.
    • a computer example from Stat 5102 about other link functions for Bernoulli regression (see also under course notes).
    • polr.R and polr.Rout using the R function polr in the MASS package (which is a recommended package that is always installed in R) which does POLR (proportional odds logistic regression) for ordered categorical response.
    • over.R and over.Rout using the quasipoisson argument to the R function glm to do overdispersed Poisson.
    • graph.R and graph.Rout using the glmbb function with graphical = TRUE.

Navigation

  • University of Minnesota
  • School of Statistics
  • Rweb
  • Stat 5421
    • General Info
    • Reading Assignments
    • Homework Assignments
    • Course Notes
    • Computer Examples
    • Errata

Copyright 2016, 2020, 2021 Charles J. Geyer

Last modified: 15 December 2021 at 1215 hours CST.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Valid HTML 4.01 Strict   Valid CSS!