The R library required to perform Durbin-Watson, Breusch-Godfrey, Breusch-Pagan, and Goldfeld-Quandt tests:
> library(lmtest)
The R library required to perform Durbin-Watson, Breusch-Godfrey, Breusch-Pagan, and Goldfeld-Quandt tests:
> library(lmtest)
If you encounter error in installing "tidyverse" package on R, the solution is on the terminal install first the two packages (libfribidi-dev and libharfbuzz-dev):
# apt-get install libhartbuzz-dev
# apt-get install libfribidi-dev
After installing these two packages, on the R cli, install the "tidyverse" package:
> install.packages("tidyverse")
To load the "tidyverse" library on R, issue the command:
library("tidyverse")
This works on Ubuntu 20.04.
Ordinary Least Squares (OLS) Regression Coefficients
MyMdl = lm(formula = GDP2018 ~ T, data = MM_DTA_01)
summary(MyMdl)
Will produce the following output:
Call:
lm(formula = GDP2018 ~ T, data = MM_DTA_01)
Residuals:
Min 1Q Median 3Q Max
-2684399 -2025650 -592330 1430009 6473734
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2427989 513893 -4.725 1.03e-05 ***
T 218026 11303 19.290 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2248000 on 76 degrees of freedom
Multiple R-squared: 0.8304, Adjusted R-squared: 0.8282
F-statistic: 372.1 on 1 and 76 DF, p-value: < 2.2e-16
Multiple Regression
MyMdl = lm(formula = GDP2018 ~ T + EX2018 + IM2018, data = MM_DTA_01)
Durbin-Watson Statistic for Serial Correlation (Autocorrelation)
DurbinWatsonTest(MyMdl)
Will produce the following output:
Durbin-Watson test
data: MyMdl
DW = 0.035978, p-value < 2.2e-16
alternative hypothesis: true autocorrelation is greater than 0
Breusch-Godfrey Statistic for Serial Correlation (Autocorrelation)
bgtest(MyMdl)
Will produce the following output:
Breusch-Godfrey test for serial correlation of order up to 1
data: MyMdl
LM test = 74.301, df = 1, p-value < 2.2e-16
Breusch-Pagan Statistic for Heteroscedasticity
bptest(MyMdl)
Will produce the following output:
Studentized Breusch-Pagan test
data: MyMdl
BP = 19.317, df = 1, p-value = 1.107e-05
Goldfeld-Quandt Statistic for Heteroscedasticity
gqtest(MyMdl)
Will produce the following output:
Goldfeld-Quandt test
data: MyMdl
BP = 29.613, df1 = 37, df2 = 37, p-value = 2.2e-16
alternative hypothesis: Variance increase from segment 1 to 2
Correlation Coefficient
head(DataNo2)
Will produce the following output:
# A tibble: 6 × 7
YR T GDP GDPPI2018 GDP2018 EX2018 IM2018
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 2008 1 8050201. 0.784 10270878. 1647293 2216258
2 2009 2 8390421. 0.805 10419633. 1481405 2192637
3 2010 3 9399451. 0.840 11183861. 1769189 2668470
4 2011 4 10144661. 0.873 11615360. 1697601 2716794
5 2012 5 11060589. 0.891 12416466. 1901720 2867464
6 2013 6 12050592. 0.909 13254644. 1817413 3037079
cor_matrix = cor(DataNo2)
print(cor_matrix)
Will produce the following output:
YR T GDP GDPPI2018 GDP2018 EX2018 IM2018
YR 1.0000000 1.0000000 0.9884230 0.9872057 0.9791493 0.9599731 0.9465083
T 1.0000000 1.0000000 0.9884230 0.9872057 0.9791493 0.9599731 0.9465083
GDP 0.9884230 0.9884230 1.0000000 0.9788880 0.9943552 0.9807268 0.9764256
GDPPI2018 0.9872057 0.9872057 0.9788880 1.0000000 0.9595876 0.9402991 0.9210839
GDP2018 0.9791493 0.9791493 0.9943552 0.9595876 1.0000000 0.9769194 0.9851542
EX2018 0.9599731 0.9599731 0.9807268 0.9402991 0.9769194 1.0000000 0.9859029
IM2018 0.9465083 0.9465083 0.9764256 0.9210839 0.9851542 0.9859029 1.0000000cor_matrix = round(cor(DataNo2), 2)print(cor_matrix)Will produce the following rounded to 2 decimal digits correlation matrix output: YR T GDP GDPPI2018 GDP2018 EX2018 IM2018
YR 1.00 1.00 0.99 0.99 0.98 0.96 0.95
T 1.00 1.00 0.99 0.99 0.98 0.96 0.95
GDP 0.99 0.99 1.00 0.98 0.99 0.98 0.98
GDPPI2018 0.99 0.99 0.98 1.00 0.96 0.94 0.92
GDP2018 0.98 0.98 0.99 0.96 1.00 0.98 0.99
EX2018 0.96 0.96 0.98 0.94 0.98 1.00 0.99
IM2018 0.95 0.95 0.98 0.92 0.99 0.99 1.00 Graphing with R
plot(MyMdl)
Will produce the following graphs:
Black Soldier Fly (Hermetia illucens)
Food Waste Coversion Ratio
Sources:
Growing Spirulina
a) Materials Needed
b) Procedure
c) Harvesting Spirulina
The software "fail2ban" is similar to DenyHosts but more general as it is not only intended for SSHD protection.
Installation
On Debian-based system, issue the command:
sudo apt-get install fail2ban -y
On Fedora-based system, issue the command:
sudo dnf install fail2ban -y
Configuration
The following sample configuration for SSHD are as follows (/etc/fail2ban/):
[sshd]
enabled = true
port = ssh
filter = sshd
logpath = /var/log/auth.log
maxretry = 3
findtime = 300
bantime = 28800
ignoreip = 127.0.0.1
Materials Needed
1. Milk - 1000ml
2. Live Yogurt Culture - 1 TBSP (You can use Yogurt purchased from store provided it still got live yogurt culture and NOT pasteurized)
3. Yogurt container that can hold 1500ml or more; preferably glass container
Procedure
1. Heat the milk in a pan at 72C for 15 seconds or more;
2. Pour the heated milk into the container, place lid slightly ajar, and let the milk cool to around 42C or less;
3. Once cooled, mix the Live Yogurt Culture to the milk; Stir to ensure the culture is distributed evenly throughout the milk;
4. Cover the container, this time you can keep the lid tight. Wait for 24 hrs for the milk to curd. Once the milk got consistency similar to store bought Yogurt, your homemade Yogurt is ready. Place it in the refrigerator for storage.