Can log likelihood function be negative

I do some optimization problem in R. I minimize the loglikelihood function. I found that the log-likelihood has a negative value. For example, I have this: -34.5. Then, when I count the AIC, I will get, a positive value for AIC. My question, Is it ok to have negative loglikelihood values (I am working with continuous data).

• Is this probably a duplicate? I would not be surprised to find that the question has been asked before. – Richard Hardy May 17 '18 at 10:40
• It's certainly a duplicate. – Glen_b May 17 '18 at 13:53
• For example, stats.stackexchange.com/questions/172846/… (the fact that it's marginal changes nothing on this issue); that one is closed in turn because its a duplicate of the oft-asked question about densities exceeding 1. That one is probably sufficient but I think there's better ones to be had. – Glen_b May 17 '18 at 15:08

$$\mathcal{L}(\theta|X) = \prod_{i=1}^n f_\theta(X_i)$$
and is a product of probability mass functions (discrete variables) or probability density functions (continuous variables) $f_\theta$ parametrized by $\theta$ and evaluated at the $X_i$ points.
• In principle any probability or probability density being 0 means that the likelihood is 0 and the log-likelihood is indeterminate. In principle also saying that the likelihood is zero amounts to saying that some observed data are impossible and that surely means a misspecified model. So in practice only positive values for $f$ enter your equation. – Nick Cox May 17 '18 at 12:35