I draw this diagram following a conversation though I could not understand the declare function part and so took the same values to get closer to what I needed. However, I need the following amendments:
- Moving the x-axis label from below to right of the axis, and removing the ticks and values -3, -2 etc.
- Changing the diagram aspect ratio: reducing the height to almost 0.75 of the current height and increasing the width to 1.5 of the current width.
Here is my code:
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{nccmath, amsmath}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\usepgfplotslibrary{groupplots,fillbetween}
\DeclareMathOperator{\CDF}{cdf}
\DeclareMathOperator{\PDF}{pdf}
\begin{document}
\begin{tikzpicture}[declare function={%
normcdf(\x,\m,\s)=1/(1 + exp(-0.07056*((\x-\m)/\s)^3 - 1.5976*(\x-\m)/\s));
gauss(\x,\u,\v)=1/(\v*sqrt(2*pi))*exp(-((\x-\u)^2)/(2*\v^2));
}]
\begin{groupplot}
[group style={group size=1 by 2},
xmin=-3,xmax=3,ymin=0,
domain=-3:3, xlabel=Time, axis lines=left]
\nextgroupplot[ylabel=Marginal Response, ytick=\empty, ymax=1]
\addplot[smooth, black,thick, xtick=\empty] {gauss(x,0,1)};
\draw [dashed](0,0)--(0,1);
\draw [dashed](3,0)--(3,1);
\nextgroupplot[ylabel=Cumulative Response, ytick=\empty, ymax=1]
\addplot[smooth, black,thick] {normcdf(x,0,1)};
\draw [dashed](0,0)--(0,2);
\draw [dashed](3,0)--(3,2);
\end{groupplot}
\end{tikzpicture}
\end{document}

