Warning in install.packages : package ‘NonlinearTSA’ is not available (for R version 3.5.1)

I want to run a Enders-Granger unit root test in R. The test comes under the package name Package ‘NonlinearTSA’. However I am getting an error message viz Warning in install.packages :
*** package ‘NonlinearTSA’ is not available (for R version 3.5.1)***

Please Help

Can you post the complete error message you get?

It might not be the elegant way to do but I am sharing what I do when I get this incompatibility error.

Go to the cran page of the package:
CRAN - Package NonlinearTSA and download the package source file (.tar.gz) and install the package using the downloaded file. It works for me most of the time.

How to install the whole package or a specific file in that package?

Now I can see you have multiple warnings.
I am also not expert for these things. However, I will suggest you to install Rtools and try again because most packages require to have rtools.

For installing using source files of packages,
you can use following code this will allow you to browse to the location of downloaded file and select the file.

install.packages(file.choose(), repos=NULL)

The problem is that there is no binary installer for your R version and you don't have a compiler (Rtools) installed in your system so you can't install from source. To solve this you could either update R so you have access to a binary installer or install Rtools and compile the package.

1 Like

Even now after sucessfully installing the package and library function. There is an error.

You haven't successfully installed the package, look closer, you are getting installation error messages.

1 Like

In addition to the installation error, I checked the package documentation and cannot find the Enders_Granger_1998() function in the package nonlinearTseries.

This function is available in the package NonlinearTSA. Try using the correct package.

Yes, I looking for NonlinearTSA only. But unable to install that package.

According the screenshot posted above, you tried to install and use the package nonlinearTseries.

How to install Rtool?

That was a mistake, I am looking for nonlinearTSA only. See my previous screenshots.

Since you are using an older version of R, you need to install rtools from the following link:

I have already downloaded it from Using Rtools40 on Windows. But don't know how to connect it with R.

You are using R version 3.5. For that you require rtools35. The link is given in the table at the above web page.

Rtools40 is for R version 4.0.

Edit: In my opinion you should install R's latest version and use it with the latest rtools version.

1 Like

Am I ok now?

Install directly from one of the CRAN mirrors.


This will install all the dependencies.
Do not download the package to your desktop and install from there.

1 Like