Package: flipped 0.0.1

Brian OMeara

flipped: Applies various odd models for coin flipping

Everyone uses the binomial as the distribution for coin flipping: this assumes for a given coin, the probability of landing heads is constant for all time. It is likely a very sound assumption. However, even for this simple example other models may be possible. This package contains such models.

Authors:Brian O'Meara [aut, cre]

flipped_0.0.1.tar.gz
flipped_0.0.1.zip(r-4.5)flipped_0.0.1.zip(r-4.4)flipped_0.0.1.zip(r-4.3)
flipped_0.0.1.tgz(r-4.4-any)flipped_0.0.1.tgz(r-4.3-any)
flipped_0.0.1.tar.gz(r-4.5-noble)flipped_0.0.1.tar.gz(r-4.4-noble)
flipped_0.0.1.tgz(r-4.4-emscripten)flipped_0.0.1.tgz(r-4.3-emscripten)
flipped.pdf |flipped.html
flipped/json (API)

# Install 'flipped' in R:
install.packages('flipped', repos = c('https://phylotastic.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/bomeara/flipped/issues

On CRAN:

1.70 score 4 scripts 12 exports 1 dependencies

Last updated 3 years agofrom:70e934a083. Checks:OK: 1 ERROR: 6. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 20 2024
R-4.5-winERRORNov 20 2024
R-4.5-linuxERRORNov 20 2024
R-4.4-winERRORNov 20 2024
R-4.4-macERRORNov 20 2024
R-4.3-winERRORNov 20 2024
R-4.3-macERRORNov 20 2024

Exports:d_coin_multiplicativedcoin_exponential_decaydcoin_from_probabilitydcoin_linearfind_congruent_modelsget_possibilitiesprob_heads_exponential_decayprob_heads_linearprob_heads_multiplicativeprofile_exponential_decay_modelprofile_linear_modeltry_many_vectors

Dependencies:nloptr

Readme and manuals

Help Manual

Help pageTopics
Compute probability of observations given an exponential decay modeld_coin_multiplicative
Compute probability of observations given an exponential decay model The idea is that the coin before handling has 100% chance of heads, but each time it is picked up that probability will decrease (maybe it is bent by the statistician's mighty thumb). After halflife times handling it, the probability of heads is 50%, and it keeps dropping from there.dcoin_exponential_decay
Compute probability of observations given a vector of probability of headsdcoin_from_probability
Compute probability of observations given linear change model This is essentially stats::dbinom() but allowing for the probability of heads to linearly change from the starting value. By default it increases by 10% per flip, but this can be set to other values.dcoin_linear
Find congruent models to a simple binomial model This will find the parameter values for other models that equal the likelihood for a simple binomial model. This may not be the MLE for these other modelsfind_congruent_models
Exhaustively get all possible sets of outcomes that result in a specified number of heads out of a certain number of flipsget_possibilities
Compute the probability of heads with each flip given an exponential model The model assumes 100% chance of heads before a coin is picked up and it drops exponentially each time the coin is handled.prob_heads_exponential_decay
Compute the probability of heads with each flip given a linear change model.prob_heads_linear
Compute the probability of heads with each flip given a multiplier model The model assumes 50% chance of heads before a coin is picked up and it changes as a percentage of the previous value each flip. i.e., the probability of heads is 101% of the probability the previous flip with a multiplier of 1.01.prob_heads_multiplicative
Computes the likelihood for a range of values using an exponential coin modelprofile_exponential_decay_model
Computes the likelihood for a range of values using a linear coin modelprofile_linear_model
Compute probability of observations across many potential vectors This will try (1/stepsize)^nflips possible vectors, computing the probability of the observation for eachtry_many_vectors