randsamp: Random sampling from multivariate normal, lognormal, or...

Description Usage Arguments Value Author(s)

View source: R/randsamp.R

Description

Generate a random sample from a multivariate normal or lognormal distribution, or from a product of independent one-dimensional distributions.

Usage

1
randsamp(sampsize=1,dist="Normal",mean=0,sd=1,cor=NA,distdef=NA,file=NA)

Arguments

sampsize

sample size

dist

distribution type: "Normal", "Lognormal", or "Indep"

mean

vector of means

sd

vector of standard deviations

cor

correlation matrix of the distribution

distdef

distribution definition for independent one-dimensional distributions

file

optional file to save results

Value

Returns a list containing:

mean

vector of means

sd

vector of standard deviations

corr

correlation matrix of the distribution

sampsize

sample size

sample

data frame of parameter samples (each row corresponds to a draw)

logpdf

vector of values of log probability density at the sample points

Author(s)

Peter Reichert <peter.reichert@eawag.ch>


baccione-eawag/EawagSchoolTools documentation built on Dec. 19, 2021, 6:38 a.m.