0
I have the code to run the auto.It runs on a small dataframe, but in some columns I have several 'NA' values (from 1990 to 2003, for example). How to establish in my code that such values are ignored? >
bra.ts <- ts(CSV_BRA, frequency = 1, start = c(1990), end = c(2016))
taxa <- ts(BRA$TX_CS, frequency = 1, start = c(1990), end = c(2016))
# Comando para indicar a regressão
covariates <- c('RURAL', 'AMZ', 'N', "VALUE_N", 'AREA')
fit<- auto.arima(bra.ts[,"TX_CS"], xreg = bra.ts[,covariates], stepwise = FALSE,
approximation = FALSE)
fit
DATAFRAME
https://drive.google.com/file/d/14YjSAAHul9YrBDfs1FoE50mNfA7ftHD6/view?usp=sharing
The function
na.omit(dataframe)
shall omit those observations.– Thiago Fernandes
Please edit the question with the output of
dput(head(CSV_BRA, 5))
. Data such as images cannot be used by those who want to help, cannot be copied to an R session.– Rui Barradas
Another way is
bra.ts2 <- bra.ts[complete.cases(bra.ts), ]
.– Rui Barradas