22 #define EPSILON 1.0e-15 24 #define INV_SQRT_2PI 0.3989422804014326779399461 40 double pnorm(
double x);
42 double qnorm(
double p);
43 double dnorm(
double x);
44 double ztransf(
double y,
double ybar,
double sigma);
For the application, basic dimensions: number of countries and bounding years.
double dnorm(double x)
The standard normal probability density.
struct datablock binop(struct datablock a, struct datablock b, char op, struct appdata ad)
Carry out a binary operation (+, -, *, /) on two datablock structures.
double quick_qnorm(double p)
Abramowitz & Stegun approximation to qnorm to get a good first guess.
A one-dimensional array that contains information on countries that is the same for all years...
struct datablock transform(struct datablock dbin, double(*f)(double), struct appdata ad)
Apply a function to a datablock.
A one-dimensional array that contains global information that is the same for all countries...
struct datablock scalmult(double scalar, struct datablock dbin, struct appdata ad)
Multiply a datablock by a scaling factor.
double ztransf(double y, double ybar, double sigma)
The transformed value .
double * data
The data, length = y_start - y_end + 1 when created.
double gini2sdlog(double gini)
The standard deviation of the log of income corresponding to a given Gini, assuming lognormal...
A two-dimensional array that contains information for country/year combinations.
double pnorm(double x)
The cumulative standardized normal distribution.
double filteryr(int year, struct datablock data, struct fixedfactor filter, struct appdata ad)
Aggregate data in a datablock using a fixedfactor "filter" for a particular year. ...
struct timeseries filter(struct datablock data, struct fixedfactor filter, struct appdata ad)
Aggregate data in a datablock using a fixedfactor "filter" to produce a timeseries.
double qnorm(double p)
The inverse cumulative standardized normal distribution.