Está en la página 1de 8

UNIVERSIDAD NACIONAL DEL CALLAO

FACULTAD DE CIENCIAS DE LA SALUD


SECCIÓN DE POSGRADO
MAESTRÍA GERENCIA EN SALUD

FUNCIONES DE SPSS

Date and Time Functions

CTIME.DAYS(timevalue) Numeric. Returns the number of days, including fractional days, in


timevalue, which must be a number or expression in time format, such as the result of the
TIME.xxx functions.

CTIME.HOURS(timevalue) Numeric. Returns the number of hours, including fractional hours,


in timevalue, which must be a number or expression in time format, as created by one of the
TIME.xxx functions or read with the TIME input format.

CTIME.MINUTES(timevalue) Numeric. Returns the number of minutes, including fractional


minutes, in timevalue, which must be a number or expression in time format, as created by
one of the TIME.xxx functions or read with the TIME input format.

CTIME.SECONDS(timevalue) Numeric. Returns the number of seconds, including fractional


seconds, in timevalue, which must be a number or expression in time format, as created by
one of the TIME.xxx functions or read with the TIME input format.

DATE.DMY(day,month,year) Numeric in date format. Returns a date value corresponding to


the indicated day, month, and year. To display this value correctly, assign it a DATE format.
The arguments must be integers, with day between 1 and 31, month between 1 and 13, and
year a four-digit integer greater than 1582.

DATE.MDY(month,day,year) Numeric in date format. Returns a date value corresponding to


the indicated month, day, and year. To display this value correctly, assign it a DATE format.
Arguments are as in the preceding function.

DATE.MOYR(month,year) Numeric in date format. Returns a date value corresponding to the


indicated month and year. To display this value correctly, assign it a DATE format. The
arguments must be integers, with month between 1 and 13 and year a four-digit integer
greater than 1582.

DATE.QYR(quarter,year) Numeric in date format. Returns a date value corresponding to the


indicated quarter and year. To display this value correctly, assign it a DATE format. The
arguments must be integers, with quarter between 1 and 4 and year a four-digit integer
greater than 1582.

DATE.WKYR(weeknum,year) Numeric in date format. Returns a date value corresponding to


the indicated weeknum and year. To display this value correctly, assign it a DATE format. The
arguments must be integers, with weeknum between 1 and 52 and year a four-digit integer
greater than 1582.

DATE.YRDAY(year,daynum) Numeric in date format. Returns a date value corresponding to


the indicated year and daynum. To display this value correctly, assign it a DATE format. The
arguments must be integers, with daynum between 1 and 366 and year a four-digit integer
greater than 1582.
1

Ms. Lic. Lucio Arnulfo Ferrer Peñaranda


UNIVERSIDAD NACIONAL DEL CALLAO
FACULTAD DE CIENCIAS DE LA SALUD
SECCIÓN DE POSGRADO
MAESTRÍA GERENCIA EN SALUD
TIME.DAYS(days) Numeric in time-interval format. Returns a time interval corresponding to
the indicated number of days. To display this value correctly, assign it a TIME format. The
argument must be numeric.

TIME.HMS(hours,min,sec) Numeric in time-interval format. Returns a time interval


corresponding to the indicated number of hours, min, and sec. To display this value correctly,
assign it a TIME format. The arguments must be integers no greater than 24, 60, and 60,
respectively, except that the first nonzero argument can exceed its limit and the last argument
can have a fractional part.

XDATE.DATE(datevalue) Numeric in date format. Returns the date portion from a numeric
value in the date format, as created by the DATE.xxx functions or read by one of the DATE
input formats. (A variable created by this function must be given a suitable display format. In
Variable View in the Data Editor, use the Type cell for the variable to assign it one of the date
display formats.)

XDATE.HOUR(datevalue) Numeric. Returns the hour (an integer between 0 and 23) from a
numeric value in date format, as created by the DATE.xxx functions or read by one of the
DATE input formats.

XDATE.JDAY(datevalue) Numeric. Returns the day of the year (an integer between 1 and
366) from a numeric value in date format, as created by the DATE.xxx functions or read by
one of the DATE input formats.

XDATE.MDAY(datevalue) Numeric. Returns the day of the month (an integer between 1 and
31) from a numeric value in date format, as created by the DATE.xxx functions or read by
one of the DATE input formats.

XDATE.MINUTE(datevalue) Numeric. Returns the minute (an integer between 0 and 59) from
a numeric value in date format, as created by the DATE.xxx functions or read by one of the
DATE input formats.

XDATE.MONTH(datevalue) Numeric. Returns the month (an integer between 1 and 12) from
a numeric value in date format, as created by the DATE.xxx functions or read by one of the
DATE input formats.

XDATE.QUARTER(datevalue) Numeric. Returns the quarter of the year (an integer between
1 and 4) from a numeric value in date format, as created by the DATE.xxx functions or read
by one of the DATE input formats.

XDATE.SECOND(datevalue) Numeric. Returns the second (a number between 0 and 60)


from a numeric value in date format, as created by the DATE.xxx functions or read by one of
the DATE input formats.

XDATE.TDAY(timevalue) Numeric. Returns the number of whole days (as an integer) from a
numeric value in time-interval format, as created by one of the TIME.xxx functions or read by
the TIME input format.

XDATE.TIME(datevalue) Numeric in time-interval format, representing the number of


seconds since midnight. Returns the time of day from a numeric value in date format, as

Ms. Lic. Lucio Arnulfo Ferrer Peñaranda


UNIVERSIDAD NACIONAL DEL CALLAO
FACULTAD DE CIENCIAS DE LA SALUD
SECCIÓN DE POSGRADO
MAESTRÍA GERENCIA EN SALUD
created by the DATE.xxx functions or read by one of the DATE input formats. (A variable
created by this function should usually be given a suitable display format. In Variable View in
the Data Editor, use the Type cell for the variable to assign it one of the date display formats
that is displayed as hours and minutes.)

XDATE.WEEK(datevalue) Numeric. Returns the week number (an integer between 1 and 53)
from a numeric value in date format, as created by the DATE.xxx functions or read by one of
the DATE input formats.

XDATE.WKDAY(datevalue) Numeric. Returns the day-of-week number (an integer between


1, Sunday and 7, Saturday) from a numeric value in date format, as created by the DATE.xxx
functions or read by one of the DATE input formats.

XDATE.YEAR(datevalue) Numeric. Returns the year (as a four-digit integer) from a numeric
value in date format, as created by the DATE.xxx functions or read by one of the DATE input
formats.

YRMODA(year,month,day) Numeric. Returns the number of days from October 15, 1582, to
the date represented by the arguments year, month, and day, which must be integers that
form a valid date since October 15, 1582. Two-digit values of year assume a century based
on the Options settings (Edit menu, Options, Data tab). By default, 2-digit years assume a
range beginning 69 years prior to the current date and ending 30 years after the current date.

Arithmetic Functions

ABS(numexpr) Numeric. Returns the absolute value of numexpr, which must be numeric.

ARSIN(numexpr) Numeric. Returns the inverse sine, in radians, of numexpr, which must
evaluate to a numeric value between -1 and +1.

ARTAN(numexpr) Numeric. Returns the inverse tangent, in radians, of numexpr, which must
be numeric.

COS(radians) Numeric. Returns the cosine of radians, which must be a numeric value,
measured in radians.

EXP(numexpr) Numeric. Returns e raised to the power numexpr, where e is the base of the
natural logarithms and numexpr is numeric. Large values of numexpr may produce results
that exceed the capacity of the machine.

LN(numexpr) Numeric. Returns the base-e logarithm of numexpr, which must be numeric and
greater than 0.

LNGAMMA(numexpr) Numeric. Returns the logarithm of the complete Gamma function of


numexpr, which must be numeric and greater than 0.

LG10(numexpr) Numeric. Returns the base-10 logarithm of numexpr, which must be numeric
and greater than 0.

Ms. Lic. Lucio Arnulfo Ferrer Peñaranda


UNIVERSIDAD NACIONAL DEL CALLAO
FACULTAD DE CIENCIAS DE LA SALUD
SECCIÓN DE POSGRADO
MAESTRÍA GERENCIA EN SALUD
MOD(numexpr,modulus) Numeric. Returns the remainder when numexpr is divided by
modulus. Both arguments must be numeric, and modulus must not be 0.

RND(numexpr) Numeric. Returns the integer that results from rounding numexpr, which must
be numeric. Numbers ending in .5 exactly are rounded away from 0.

SIN(radians) Numeric. Returns the sine of radians, which must be a numeric value,
measured in radians.

SQRT(numexpr) Numeric. Returns the positive square root of numexpr, which must be
numeric and not negative.

TRUNC(numexpr) Numeric. Returns the value of numexpr truncated to an integer (toward 0).

Conversion Functions

NUMBER(strexpr,format) Numeric. Returns the value of the string expression strexpr as a


number. The second argument, format, is the numeric format used to read strexpr. Thus, if
name is an eight-character string containing the character representation of a number,
NUMBER(name, f8) is the numeric representation of that number. If the string cannot be read
using the format, this function returns system-missing.

STRING(numexpr,format) String. Returns the string that results when numexpr is converted
to a string according to format. STRING(-1.5,F5.2) returns the string value '-1.50'. The
second argument, format, must be a format for writing a numeric value.

Logical Functions

RANGE(test,lo,hi[,lo,hi,...]) Logical. Returns 1 or true if test is within any of the inclusive


range(s) defined by the lo, hi pairs. Arguments must be all numeric or all strings of the same
length, and each of the lo, hi pairs must be ordered with lo <= hi.

Note: For string values, results can vary by locale even for the same set of characters since
the national collating sequence is used. Language order, not ASCII order, determines where
certain characters fall in the sequence.

ANY(test,value[,value,...]) Logical. Returns 1 or true if the value of test matches any of the
subsequent values; returns 0 or false otherwise. This function requires two or more
arguments.

Cumulative Distribution Functions

The following functions give the probability that a random variable with the specified
distribution will be less than quant, the first argument. Subsequent arguments are the
parameters of the distribution. Note the period in each function name.

Ms. Lic. Lucio Arnulfo Ferrer Peñaranda


UNIVERSIDAD NACIONAL DEL CALLAO
FACULTAD DE CIENCIAS DE LA SALUD
SECCIÓN DE POSGRADO
MAESTRÍA GERENCIA EN SALUD
CDF.BERNOULLI(quant, prob) Numeric. Returns the cumulative probability that a value from
the Bernoulli distribution, with the given probability parameter, will be less than or equal to
quant.

CDF.BETA(quant, shape1, shape2) Numeric. Returns the cumulative probability that a value
from the beta distribution, with the given shape parameters, will be less than quant.

CDF.BINOM(quant, n, prob) Numeric. Returns the cumulative probability that the number of
successes in n trials, with probability prob of success in each, will be less than or equal to
quant. When n is 1, this is the same as CDF.BERNOULLI.

CDF.BVNOR(quant1, quant2, corr) Numeric. Returns the cumulative probability that a value
from the standard bivariate normal distribution, with the given correlation parameter, will be
less than quant1 and quant2.

CDF.CAUCHY(quant, loc, scale) Numeric. Returns the cumulative probability that a value
from the Cauchy distribution, with the given location and scale parameters, will be less than
quant.

CDF.CHISQ(quant, df) Numeric. Returns the cumulative probability that a value from the chi-
square distribution, with df degrees of freedom, will be less than quant.

CDF.EXP(quant, shape) Numeric. Returns the cumulative probability that a value from the
exponential distribution, with the given shape parameter, will be less than quant.

CDF.F(quant, df1, df2) Numeric. Returns the cumulative probability that a value from the F
distribution, with degrees of freedom df1 and df2, will be less than quant.

CDF.GAMMA(quant, shape, scale) Numeric. Returns the cumulative probability that a value
from the gamma distribution, with the given shape and scale parameters, will be less than
quant.

CDF.GEOM(quant, prob) Numeric. Returns the cumulative probability that the number of
trials to obtain a success, when the probability of success is given by prob, will be less than
or equal to quant.

CDF.HALFNRM(quant, mean, stddev) Numeric. Returns the cumulative probability that a


value from the half normal distribution, with specified mean and standard deviation, will be
less than quant.

CDF.HYPER(quant, total, sample, hits) Numeric. Returns the cumulative probability that the
number of objects with a specified characteristic, when sample objects are randomly selected
from a universe of size total in which hits have the specified characteristic, will be less than or
equal to quant.

CDF.IGAUSS(quant, loc, scale) Numeric. Returns the cumulative probability that a value from
the inverse Gaussian distribution, with the given location and scale parameters, will be less
than quant.

Ms. Lic. Lucio Arnulfo Ferrer Peñaranda


UNIVERSIDAD NACIONAL DEL CALLAO
FACULTAD DE CIENCIAS DE LA SALUD
SECCIÓN DE POSGRADO
MAESTRÍA GERENCIA EN SALUD
CDF.LAPLACE(quant, mean, scale) Numeric. Returns the cumulative probability that a value
from the Laplace distribution, with the specified mean and scale parameters, will be less than
quant.

CDF.LOGISTIC(quant, mean, scale) Numeric. Returns the cumulative probability that a value
from the logistic distribution, with the specified mean and scale parameters, will be less than
quant.

CDF.LNORMal(quant, a, b) Numeric. Returns the cumulative probability that a value from the
log-normal distribution, with the specified parameters, will be less than quant.

CDF.NEGBIN(quant, thresh, prob) Numeric. Returns the cumulative probability that the
number of trials to obtain a success, when the threshold parameter is thresh and the
probability of success is given by prob, will be less than or equal to quant.

CDFNORM(zvalue) Numeric. Returns the probability that a random variable with mean 0 and
standard deviation 1 would be less than zvalue, which must be numeric.

CDF.NORMal(quant, mean, stddev) Numeric. Returns the cumulative probability that a value
from the normal distribution, with specified mean and standard deviation, will be less than
quant.

CDF.PARETO(quant, threshold, shape) Numeric. Returns the cumulative probability that a


value from the Pareto distribution, with the specified threshold and shape parameters, will be
less than quant.

CDF.POISSON(quant, mean) Numeric. Returns the cumulative probability that a value from
the Poisson distribution, with the specified mean or rate parameter, will be less than or equal
to quant.

CDF.SMOD(quant, a, b) Numeric. Returns the cumulative probability that a value from the
Studentized maximum modulus, with the specified parameters, will be less than quant.

CDF.SRANGE(quant, a, b) Numeric. Returns the cumulative probability that a value from the
Studentized range statistic, with the specified parameters, will be less than quant.

CDF.T(quant, df) Numeric. Returns the cumulative probability that a value from Student's t
distribution, with the specified degrees of freedom df, will be less than quant.

CDF.UNIFORM(quant, min, max) Numeric. Returns the cumulative probability that a value
from the uniform distribution, with the specified minimum and maximum, will be less than
quant.

CDF.WEIBULL(quant, a, b) Numeric. Returns the cumulative probability that a value from the
Weibull distribution, with the specified parameters, will be less than quant.

NCDF.BETA(quant, shape1, shape2, nc) Numeric. Returns the cumulative probability that a
value from the noncentral beta distribution, with the given shape and noncentrality
parameters, will be less than quant.

Ms. Lic. Lucio Arnulfo Ferrer Peñaranda


UNIVERSIDAD NACIONAL DEL CALLAO
FACULTAD DE CIENCIAS DE LA SALUD
SECCIÓN DE POSGRADO
MAESTRÍA GERENCIA EN SALUD
NCDF.CHISQ(quant, df,nc) Numeric. Returns the cumulative probability that a value from the
noncentral chi-square distribution, with df degrees of freedom and the specified noncentrality
parameter, will be less than quant.

NCDF.F(quant, df1, df2,nc) Numeric. Returns the cumulative probability that a value from the
noncentral F distribution, with degrees of freedom df1 and df2 and noncentrality nc, will be
less than quant.

NCDF.T(quant, df,nc) Numeric. Returns the cumulative probability that a value from the
noncentral Student's t distribution, with the specified degrees of freedom df and noncentrality
nc, will be less than quant.

Statistical Functions

The .n suffix can be used with all statistical functions to specify the number of valid
arguments. For example, MEAN.2(A,B,C,D) returns the mean of the valid values for variables
A, B, C, and D only if at least two of the variables have valid values. The default for n is 2 for
SD, VARIANCE, and CFVAR, and 1 for other statistical functions.

CFVAR(numexpr,numexpr[,...]) Numeric. Returns the coefficient of variation (the standard


deviation divided by the mean) of its arguments that have valid values. This function requires
two or more arguments, which must be numeric. You can specify a minimum number of valid
arguments for this function to be evaluated.

LAG(variable) Numeric or string. Returns the value of variable for the previous case in the
data file. Returns system-missing (numeric variables) or blank (string variables) for the first
case.

LAG(variable,ncases) Numeric or string. Returns the value of variable for the case that is
ncases earlier in the file. Returns system-missing (numeric variables) or blank (string
variables) for the first ncases cases.

Note: In a series of transformation commands without any intervening EXECUTE commands


or other command that reads the data, lag functions are calculated after all other
transformations, regardless of command order.

MAX(value,value[,...]) Numeric or string. Returns the maximum value of its arguments that
have valid values. This function requires two or more arguments. You can specify a minimum
number of valid arguments for this function to be evaluated.

MEAN(numexpr,numexpr[,...]) Numeric. Returns the arithmetic mean of its arguments that


have valid values. This function requires two or more arguments, which must be numeric.
You can specify a minimum number of valid arguments for this function to be evaluated.

MIN(value,value[,...]) Numeric or string. Returns the minimum value of its arguments that
have valid values. This function requires two or more arguments. You can specify a minimum
number of valid arguments for this function to be evaluated.

Ms. Lic. Lucio Arnulfo Ferrer Peñaranda


UNIVERSIDAD NACIONAL DEL CALLAO
FACULTAD DE CIENCIAS DE LA SALUD
SECCIÓN DE POSGRADO
MAESTRÍA GERENCIA EN SALUD
NVALID(variable[,...]) Numeric. Returns a count of the arguments that have valid, nonmissing
values. This function requires one or more arguments, which should be variable names in the
working data file.

SD(numexpr,numexpr[,...]) Numeric. Returns the standard deviation of its arguments that


have valid values. This function requires two or more arguments, which must be numeric.
You can specify a minimum number of valid arguments for this function to be evaluated.

SUM(numexpr,numexpr[,...]) Numeric. Returns the sum of its arguments that have valid
values. This function requires two or more arguments, which must be numeric. You can
specify a minimum number of valid arguments for this function to be evaluated.

VARIANCE(numexpr,numexpr[,...]) Numeric. Returns the variance of its arguments that have


valid values. This function requires two or more arguments, which must be numeric. You can
specify a minimum number of valid arguments for this function to be evaluated.º

Ms. Lic. Lucio Arnulfo Ferrer Peñaranda

También podría gustarte