Learn R Programming

widals (version 0.6.2)

unif.mh: Local Search Function

Description

Search function

Usage

unif.mh(n, center, sd)

Value

A numeric vector of length \(n\).

Arguments

n

Sample size. A positive scalar integer.

center

Mean. A numeric scalar (or vector).

sd

Standard deviation. A numeric scalar (or vector).

See Also

dlog.norm, MSS.snow.

Examples

Run this code

x <- unif.mh(100, 1, 1)
hist(x)

## The function is currently defined as
function (n, center, sd) 
{
    w <- sd * sqrt(3)
    a <- center - w
    b <- center + w
    x <- runif(n, a, b)
    return(x)
  }

Run the code above in your browser using DataLab