# Group by Gender_SNB and num_SNB, and calculate summary statistics av_data1_all <- s_complete %>% group_by(Gender_SNB, num_SNB) %>% summarise(mean_num_SNB = mean(num_SNB), sum_synch = sum(synch), count = n()) %>% ungroup()
## Regression Regression analysis is a form of predictive modelling technique which investigates the relationship between a dependent (target) and independent variable (s) (predictor). This technique is used for forecasting, time series modelling and finding the causal effect relationship between the variables. For example, relationship between rash driving and number of road accidents by a driver is best studied through regression. Regression analysis is an important tool for modelling and analyzing data. Here, we fit a regression line to observed data. One sample of observations is taken and a line is fitted to the data. The best fit line is known as regression line and represented by a linear equation Y=a+bX. Linear regression is a statistical approach for modelling relationship between a dependent variable with a given set of independent variables. Mathematically a linear relationship represents a straight line when plotted as a graph. And a non-linear relationship is represented by a curve in a graph. The term “linearity” in algebra refers to a linear relationship between two or more variables. If we draw this relationship in a two-dimensional space (between two variables, in this case), we get a straight line.