We use linear models primarily to analyse cross-sectional data; i.e. data collected at one specific point in time across several observations. We can also use such models with time series data, but need to be cautious of issues such as serial correlation.
A neural network is a computational system that creates predictions based on existing data. Let us train and test a neural network using the neuralnet library in R.