Let $K$ be a number field. Fix a finite set of analytic functions $\mathbf{f}_{\infty}:=\{f_{1,\infty}(x),\ldots,f_{s,\infty}(x) \}$ defined on $\{x\in \mathbb{C} \mid |x|>1\}$ (resp. $\mathbb{C}_p$-valued functions $\mathbf{f}_{p}:=\{f_{1,p}(x),\ldots,f_{s,p}(x) \}$ defined on $\{x\in \mathbb{C}_p \mid |x|_p>1\}$). For $\beta\in K$, we denote the $K$-vector space spanned by $f_{1,\infty}(\beta),\ldots,f_{s,\infty}(\beta)$ by $V_K(\mathbf{f}_{\infty},\beta)$ (resp. $f_{1,p}(\beta),\ldots,f_{s,p}(\beta)$ by $V_K(\mathbf{f}_{p},\beta)$). In this article, under some assumptions for $\mathbf{f}_{\infty}$ (resp. $\mathbf{f}_{p}$), we give an estimation of a lower bound of the dimension of $V_K(\mathbf{f}_{\infty},\beta)$ (resp. $V_K(\mathbf{f}_{p},\beta)$) (see Theorem~2.4 for Archimedean case and Theorem~8.6 for $p$-adic case). Applying our estimation, we give a lower bound of the dimension of the $K$-vector space spanned by the special values of the Lerch functions over a number field in $\mathbb{C}$ (see Theorem~1.1 and Remark~1.2) and the $p$-adic analog of the above result (see Theorem~1.3 and Remark~1.4). Furthermore, we also give a lower bound of the $K$-vector space spanned by the special values of certain $p$-adic functions related with $p$-adic Hurwitz zeta function (see Theorem~1.5).