first time here, so I hope that you will could help me!
I went to simulate stationary and positive AR(1) process such as $X[t]=a*X_{t-1}+ \sqrt{1-a^2}*e_t$, where $e\sim N(n,0,1)$ and $a=0.1$. In order to get positive value, can I just use the absolute value of X? Is an absolute value of an AR(1) still an AR(1)?
Here are my simulation steps :
n=100
e=rnorm(n)
a=0.1
X=rep(0,n)
X[1]<-rnorm(1,0,1)
for(t in 2:n){X[t]=a*X[t-1]+ sqrt(1-a^2)*e[t]}
X<-abs(X)
I chose to answer your question in a list form since I felt your question consisted of several sub-questions.
It is important to note whether the sequence $\{e_t\}$ consists of independent random variables or not.
Instead of writing $X_t = aX_{t-1} + \sqrt{1-a^2}e_t$ with $e_t\sim\mathcal N(0,1)$, we rather write $X_t = aX_{t-1} + e_t$ with $e_t \sim \mathcal N(0,1-a^2)$. This is because then $X_t$ is on the standard form of an $\operatorname{AR}(1)$ process. You may say that $\{e_t\}$ is a white noise process with variance $\sigma^2 = 1-a^2$.
If you take the absolute value of the process, I suppose you may still be able to find $e'_t$ such that $\lvert X_t\rvert = Y_t = c+ a'Y_{t-1} + e'_t$ is a stationary time series and thus that $Y_t$ is an $\operatorname{AR}(1)$ process for some mean-zero process $e'_t$. If $X_t$ is stationary so is $Y_t$ which is usually the important part.