\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{color}
\usepackage\[hmarginratio=2:2\]{geometry}
\usepackage{epstopdf}
\usepackage{afterpage}
\usepackage{ upgreek }
\usepackage{mathtools}
\begin{document}
The survival function is defined as the probability that an individual survives longer than t. It can be expressed as\\
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}
\begin{align*}
S(t)&=P(T>t)\\
&=1-P(T\leq t)\\
&=1-F(t)
\end{align*}\\
The survival function of the Gompertz distribution is given by,
\begin{equation}
S(t;\gamma;\lambda)=\text{exp}\left\[\frac{\lambda}{\gamma}(1-e^{\gamma t})\right\]
\end{equation}\\
The hazard function of survival time is defined as the probability that an individual fails in a very short interval, t + $\Delta$t, given that the individual has survived to t.
\begin{equation}
\frac{\lim_{\Delta t\to 0} P\left\[
\begin{tabular}{c}
an individual fails in the interval $(t, t+\Delta t)$,\\
given the individual has survived to t
\end{tabular}
\right\]}
{\Delta t}
\end{equation}
\end{document}
Can I apply the \abovedisplayskip
and \belowdisplayskip
to only one equation? I just want to use it for the equation with align
but it applies for every equation below it.
\\
afteralign
intentional? remove them and not change deliberately defined\abovedisplayskip
and\belowdisplayskip
amounts.\onehalfspacing
or\doublespacing
for producing the image, but don't set them in the example.