draw.norm: Draws an Normal distribution

View source: R/draw.R

draw.normR Documentation

Draws an Normal distribution

Description

By providing X, mean and sd, you can draw either CDF or PMF

Usage

draw.norm(
  X,
  mean = 0,
  sd = 1,
  cumulative = T,
  sort.prob = F,
  round = 3,
  x.range = NULL,
  show.label = TRUE,
  nudge = 0
)

Arguments

X

Mishtane Mikri. Can be a vector of values.

mean

The mean of the distribution

sd

The standard deviation of the distribution

cumulative

A logical. If FALSE: draws a PMF default is set to TRUE

sort.prob

A logical. Concerns the data frame returned, if TRUE: sort by probability (in decreasing order), Otherwise same order as input of X. default is set to FALSE.

round

How many decimals to show. Default is set to 3.

x.range

a vector of two numbers The probability of occurrence between these two values. Use c(min,max).

show.label

A logical. Default (TRUE) prints probability labels on the plot.

nudge

When show.label is TRUE, you can adjust the location of the labels by inputing a 2 length vector to adjust the label position (a single values works too). Usualy no adjustment is needed.

Value

graph (Print only).

Tohelet and Shonut (Print only).

data.frame of X and their probs (use sort.prob to change order method.

range The probability between the range in x.range. "Prob for success between these two values"

See Also

For a fully detailed explanation about the differences between distributions please visit https://www.researchgate.net/post/What-is-the-difference-between-probability-distribution-function-and-probability-density-function

Examples

x <- seq(60,90,by=5)
draw.norm(x,mean=75,sd=5)
draw.norm(x,mean=75,sd=5,cumulative=FALSE)
draw.norm(0:10,5,1.5,x.range=c(3.5,7))
# In a distribution of mean=5 and sd=1.5, print values 0-10. Also what is the probability between 3.5 and 7?

bgupsych/bgupsych documentation built on Nov. 1, 2023, 9:41 a.m.