dfmodel: Analytical distribution functions

Description Usage Arguments Author(s) See Also Examples

View source: R/dfmodel.R

Description

This function allows the user to call several pre-defined distribution functions (DFs). In the current implementation, they are all galaxy mass functions (i.e. a type of one-dimensional DFs), such as the Schechter function.

Usage

1
dfmodel(x = NULL, p = NULL, output = "density", type = "Schechter")

Arguments

x

Vector of log-masses, typically x = log10(M/Msun).

p

Parameters of the analytical function. See argument type.

output

Specifies what the function is doing. 'density' evaluates the MF at (x,p), 'npara' returns the number of parameters of the analytical function, 'initial' returns a vector of typical parameters p that are used as default initial values when fitting the MF, 'equation' returns a string with the equation of the MF, 'function' returns a function of (x,p), 'names' returns a list of strings specifying the parameter names in the expression format.

type

Kind of MF: 'Schechter' for Schechter function; 'PL' for a simple power law; 'MRP' for a Murray-Robotham-Power function, a 4-parameter extension of the Schechter function.

Author(s)

Danail Obreschkow

See Also

dffit

Examples

1
2
3
4
5
6
# Evaluate and plot a Schechter function
x = seq(7,11,length=100)
mass = 10^x
parameters = c(-2,10,-1.5)
phi = dfmodel(x, parameters, type = 'Schechter')
plot(mass, phi, type='l', log='xy')

obreschkow/dftools documentation built on June 25, 2021, 10:45 p.m.