library(corrplot)
## corrplot 0.92 loaded
library(readr)
library(ggplot2)
library(tidyverse)
## ── Attaching packages
## ───────────────────────────────────────
## tidyverse 1.3.2 ──
## ✔ tibble 3.1.8 ✔ dplyr 1.0.10
## ✔ tidyr 1.2.1 ✔ stringr 1.4.1
## ✔ purrr 0.3.5 ✔ forcats 0.5.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
library(dplyr)
library(sp)
library(mosaic)#summary statistics
## Registered S3 method overwritten by 'mosaic':
## method from
## fortify.SpatialPolygonsDataFrame ggplot2
##
## The 'mosaic' package masks several functions from core packages in order to add
## additional features. The original behavior of these functions should not be affected by this.
##
## Attaching package: 'mosaic'
##
## The following object is masked from 'package:Matrix':
##
## mean
##
## The following objects are masked from 'package:dplyr':
##
## count, do, tally
##
## The following object is masked from 'package:purrr':
##
## cross
##
## The following object is masked from 'package:ggplot2':
##
## stat
##
## The following objects are masked from 'package:stats':
##
## binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
## quantile, sd, t.test, var
##
## The following objects are masked from 'package:base':
##
## max, mean, min, prod, range, sample, sum
library(Hmisc)#Hmisc package calculates weighted means
## Loading required package: survival
## Loading required package: Formula
##
## Attaching package: 'Hmisc'
##
## The following objects are masked from 'package:dplyr':
##
## src, summarize
##
## The following objects are masked from 'package:base':
##
## format.pval, units
library(moments)#facilitates calculation of skewness and kurtosis
library(gmodels)
library(prettyR)
##
## Attaching package: 'prettyR'
##
## The following object is masked from 'package:Hmisc':
##
## describe
library(nortest)
library(lawstat)
library(biglm)
## Loading required package: DBI
library(dynlm)
## Loading required package: zoo
##
## Attaching package: 'zoo'
##
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
library(TTR)
library(zoo)
library(tseries)
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
##
## Attaching package: 'tseries'
##
## The following object is masked from 'package:lawstat':
##
## runs.test
##
## The following object is masked from 'package:mosaic':
##
## value
library(car)# for diagnostics
## Loading required package: carData
##
## Attaching package: 'car'
##
## The following object is masked from 'package:lawstat':
##
## levene.test
##
## The following objects are masked from 'package:mosaic':
##
## deltaMethod, logit
##
## The following object is masked from 'package:dplyr':
##
## recode
##
## The following object is masked from 'package:purrr':
##
## some
library(knitr)
library(corrplot)
library(hexbin)#hexagonal binning routines
library(lattice)#for graphics
library(car)#companion to applied regression
setwd("C:/Users/rwadada/Desktop/Financial Stability Irene Nduhukire")
financial_stability<-read.csv(file.choose())
macroeconomic.factors<-read.csv(file.choose())
#Data Manipulation (Data transformations)
LRediscount<-log(macroeconomic.factors$Rediscount.Rate)
Llending<-log(macroeconomic.factors$Lending.Rate)
Ltreasury<-log(macroeconomic.factors$X91.day.Treasury.Bill.Yield)
summary(financial_stability)
## X Period financial.stability NOPC
## Min. : 1.00 Length:90 Min. : 7.894 Min. :-9.9633
## 1st Qu.:23.25 Class :character 1st Qu.:12.172 1st Qu.:-6.0742
## Median :45.50 Mode :character Median :15.409 Median :-3.0319
## Mean :45.50 Mean :14.537 Mean :-0.4560
## 3rd Qu.:67.75 3rd Qu.:16.925 3rd Qu.:-0.5248
## Max. :90.00 Max. :18.265 Max. :42.2109
## FATA FLTL FLTLia FDTD
## Min. :22.67 Min. :18.08 Min. :24.80 Min. :26.00
## 1st Qu.:27.79 1st Qu.:26.27 1st Qu.:30.92 1st Qu.:30.17
## Median :29.72 Median :30.73 Median :34.45 Median :33.67
## Mean :29.87 Mean :32.42 Mean :34.92 Mean :33.71
## 3rd Qu.:31.29 3rd Qu.:38.57 3rd Qu.:38.26 3rd Qu.:36.49
## Max. :41.25 Max. :47.38 Max. :47.58 Max. :44.74
## NIITI SDLDR SFELDR PENIE
## Min. :28.92 Min. :1339 Min. : 394.5 Min. :34.27
## 1st Qu.:33.67 1st Qu.:1669 1st Qu.: 693.5 1st Qu.:40.08
## Median :35.31 Median :1794 Median : 813.7 Median :41.70
## Mean :35.66 Mean :1811 Mean : 804.5 Mean :41.56
## 3rd Qu.:37.55 3rd Qu.:1924 3rd Qu.: 896.7 3rd Qu.:43.04
## Max. :43.21 Max. :2386 Max. :1326.6 Max. :51.71
## TLTA NIIATA LLPNPL SPNPL
## Min. :23.80 Min. :6.596 Min. : 43.26 Min. :36.41
## 1st Qu.:33.30 1st Qu.:7.803 1st Qu.: 54.84 1st Qu.:45.78
## Median :43.90 Median :8.077 Median : 61.74 Median :50.47
## Mean :41.06 Mean :8.121 Mean : 87.86 Mean :52.39
## 3rd Qu.:47.61 3rd Qu.:8.472 3rd Qu.: 72.63 3rd Qu.:57.45
## Max. :54.00 Max. :9.444 Max. :1590.56 Max. :78.00
## STDTD CDTA LASTL CDTL
## Min. : 78.03 Min. :60.92 Min. :17.02 Min. :127.5
## 1st Qu.: 95.21 1st Qu.:67.73 1st Qu.:44.24 1st Qu.:141.2
## Median : 98.43 Median :69.56 Median :47.01 Median :157.9
## Mean : 98.45 Mean :70.53 Mean :45.88 Mean :182.1
## 3rd Qu.:103.15 3rd Qu.:72.36 3rd Qu.:50.81 3rd Qu.:212.1
## Max. :110.71 Max. :85.24 Max. :66.31 Max. :330.1
## TLTD
## Min. :30.30
## 1st Qu.:47.16
## Median :63.34
## Mean :58.99
## 3rd Qu.:70.80
## Max. :78.41
hist(financial_stability$financial.stability)
hist(financial_stability$NOPC)
hist(financial_stability$FATA)
hist(financial_stability$FLTL)
hist(financial_stability$FLTLia)
hist(financial_stability$FDTD)
hist(financial_stability$NIITI)
hist(financial_stability$SDLDR)
hist(financial_stability$SFELDR)
hist(financial_stability$PENIE)
hist(financial_stability$TLTA)
hist(financial_stability$NIIATA)
hist(financial_stability$LLPNPL)
hist(financial_stability$SPNPL)
hist(financial_stability$STDTD)
hist(financial_stability$CDTA)
hist(financial_stability$LASTL)
hist(financial_stability$CDTL)
hist(financial_stability$TLTD)
# Descriptive Statistics ## Univariate Level Analysis for macroeconomic
factors
summary(macroeconomic.factors)
## X Period financial.stability exchange.rate
## Min. : 1.00 Length:90 Min. : 7.894 Min. :1514
## 1st Qu.:23.25 Class :character 1st Qu.:12.172 1st Qu.:1814
## Median :45.50 Mode :character Median :15.409 Median :2420
## Mean :45.50 Mean :14.537 Mean :2551
## 3rd Qu.:67.75 3rd Qu.:16.925 3rd Qu.:3531
## Max. :90.00 Max. :18.265 Max. :3840
## Rediscount.Rate Lending.Rate X91.day.Treasury.Bill.Yield
## Min. : 4.99 Min. : 16.33 Min. : 2.969
## 1st Qu.: 11.92 1st Qu.: 19.05 1st Qu.: 7.978
## Median : 14.00 Median : 20.17 Median : 9.491
## Mean : 34.74 Mean : 41.08 Mean : 30.807
## 3rd Qu.: 15.79 3rd Qu.: 22.29 3rd Qu.: 12.200
## Max. :1847.61 Max. :1847.61 Max. :1847.607
## PSC M3 M2 Inflation
## Min. : 541.3 Min. : 1316 Min. : 1015 Min. :-4.424
## 1st Qu.: 1390.9 1st Qu.: 2882 1st Qu.: 2231 1st Qu.: 3.439
## Median : 6382.8 Median :10199 Median : 7641 Median : 5.680
## Mean : 7455.2 Mean :12071 Mean : 8749 Mean : 9.674
## 3rd Qu.:12381.7 3rd Qu.:18898 3rd Qu.:13245 3rd Qu.: 9.086
## Max. :20760.5 Max. :35869 Max. :26331 Max. :81.832
## Domestic.Credit total.exports govt.treasury foreign.reserves
## Min. : 640.2 Min. : 31.0 Min. : 337.3 Min. : 718
## 1st Qu.: 1372.0 1st Qu.: 81.0 1st Qu.:1198.7 1st Qu.:1359
## Median : 7172.5 Median :213.9 Median :1523.4 Median :2665
## Mean : 9110.6 Mean :197.4 Mean :2450.7 Mean :2446
## 3rd Qu.:14995.2 3rd Qu.:254.4 3rd Qu.:3513.3 3rd Qu.:3166
## Max. :32968.4 Max. :603.9 Max. :6404.2 Max. :4464
summary(macroeconomic.factors)
## X Period financial.stability exchange.rate
## Min. : 1.00 Length:90 Min. : 7.894 Min. :1514
## 1st Qu.:23.25 Class :character 1st Qu.:12.172 1st Qu.:1814
## Median :45.50 Mode :character Median :15.409 Median :2420
## Mean :45.50 Mean :14.537 Mean :2551
## 3rd Qu.:67.75 3rd Qu.:16.925 3rd Qu.:3531
## Max. :90.00 Max. :18.265 Max. :3840
## Rediscount.Rate Lending.Rate X91.day.Treasury.Bill.Yield
## Min. : 4.99 Min. : 16.33 Min. : 2.969
## 1st Qu.: 11.92 1st Qu.: 19.05 1st Qu.: 7.978
## Median : 14.00 Median : 20.17 Median : 9.491
## Mean : 34.74 Mean : 41.08 Mean : 30.807
## 3rd Qu.: 15.79 3rd Qu.: 22.29 3rd Qu.: 12.200
## Max. :1847.61 Max. :1847.61 Max. :1847.607
## PSC M3 M2 Inflation
## Min. : 541.3 Min. : 1316 Min. : 1015 Min. :-4.424
## 1st Qu.: 1390.9 1st Qu.: 2882 1st Qu.: 2231 1st Qu.: 3.439
## Median : 6382.8 Median :10199 Median : 7641 Median : 5.680
## Mean : 7455.2 Mean :12071 Mean : 8749 Mean : 9.674
## 3rd Qu.:12381.7 3rd Qu.:18898 3rd Qu.:13245 3rd Qu.: 9.086
## Max. :20760.5 Max. :35869 Max. :26331 Max. :81.832
## Domestic.Credit total.exports govt.treasury foreign.reserves
## Min. : 640.2 Min. : 31.0 Min. : 337.3 Min. : 718
## 1st Qu.: 1372.0 1st Qu.: 81.0 1st Qu.:1198.7 1st Qu.:1359
## Median : 7172.5 Median :213.9 Median :1523.4 Median :2665
## Mean : 9110.6 Mean :197.4 Mean :2450.7 Mean :2446
## 3rd Qu.:14995.2 3rd Qu.:254.4 3rd Qu.:3513.3 3rd Qu.:3166
## Max. :32968.4 Max. :603.9 Max. :6404.2 Max. :4464
plot (density(macroeconomic.factors$financial.stability))
plot (density (macroeconomic.factors$exchange.rate))
plot (density (macroeconomic.factors$Rediscount.Rate))
plot (density (macroeconomic.factors$Lending.Rate))
plot (density (macroeconomic.factors$X91.day.Treasury.Bill.Yield))
plot (density (macroeconomic.factors$PSC))
plot (density (macroeconomic.factors$M3))
plot (density (macroeconomic.factors$M2))
plot (density (macroeconomic.factors$Inflation))
plot (density (macroeconomic.factors$Domestic.Credit))
plot (density (macroeconomic.factors$total.exports))
plot (density (macroeconomic.factors$govt.treasury))
plot (density (macroeconomic.factors$foreign.reserves))
densityplot(macroeconomic.factors$financial.stability, data=macroeconomic.factors)
## Warning in densityplot.numeric(macroeconomic.factors$financial.stability, :
## explicit 'data' specification ignored
#Bivariate Level Analysis ##Correlation Coefficients and
Scatterplots
cor.test(macroeconomic.factors$exchange.rate,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = 13.722, df = 88, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.7459805 0.8818640
## sample estimates:
## cor
## 0.8255377
cor.test(macroeconomic.factors$Rediscount.Rate,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = -1.4116, df = 88, p-value = 0.1616
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.34525135 0.06014535
## sample estimates:
## cor
## -0.1487991
cor.test(macroeconomic.factors$Lending.Rate,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = -1.3627, df = 88, p-value = 0.1764
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.34070591 0.06527652
## sample estimates:
## cor
## -0.1437579
cor.test(macroeconomic.factors$X91.day.Treasury.Bill.Yield,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = -1.3905, df = 88, p-value = 0.1679
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.34328821 0.06236408
## sample estimates:
## cor
## -0.1466206
cor.test(macroeconomic.factors$PSC,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = 15.519, df = 88, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.7884337 0.9028709
## sample estimates:
## cor
## 0.855793
cor.test(macroeconomic.factors$M3,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = 13.844, df = 88, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.7491874 0.8834699
## sample estimates:
## cor
## 0.8278392
cor.test(macroeconomic.factors$M2,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = 13.804, df = 88, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.7481357 0.8829436
## sample estimates:
## cor
## 0.8270847
cor.test(macroeconomic.factors$Inflation,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = -4.2799, df = 88, p-value = 4.744e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.5729252 -0.2275520
## sample estimates:
## cor
## -0.4150827
cor.test(macroeconomic.factors$Domestic.Credit,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = 11.938, df = 88, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.6918604 0.8542783
## sample estimates:
## cor
## 0.786293
cor.test(macroeconomic.factors$total.exports,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = 15.099, df = 88, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.7794217 0.8984567
## sample estimates:
## cor
## 0.8494087
cor.test(macroeconomic.factors$govt.treasury,macroeconomic.factors$financial.stability)
##
## Pearson's product-moment correlation
##
## data: x and y
## t = 12.249, df = 88, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.7023005 0.8596719
## sample estimates:
## cor
## 0.7939233
plot(macroeconomic.factors$exchange.rate,macroeconomic.factors$financial.stability)
plot(LRediscount, macroeconomic.factors$financial.stability)
plot(Llending, macroeconomic.factors$financial.stability)
plot(macroeconomic.factors$X91.day.Treasury.Bill.Yield, macroeconomic.factors$financial.stability)
plot(macroeconomic.factors$PSC, macroeconomic.factors$financial.stability)
plot(macroeconomic.factors$M3, macroeconomic.factors$financial.stability)
plot(macroeconomic.factors$M2, macroeconomic.factors$financial.stability)
plot(macroeconomic.factors$Inflation, macroeconomic.factors$financial.stability)
plot(macroeconomic.factors$Domestic.Credit, macroeconomic.factors$financial.stability)
plot(macroeconomic.factors$total.exports, macroeconomic.factors$financial.stability)
plot(macroeconomic.factors$govt.treasury, macroeconomic.factors$financial.stability)
plot(macroeconomic.factors$foreign.reserves, macroeconomic.factors$financial.stability)
plot (hexbin (macroeconomic.factors$exchange.rate, macroeconomic.factors$financial.stability))
plot(hexbin (LRediscount, macroeconomic.factors$financial.stability))
plot(hexbin (Llending, macroeconomic.factors$financial.stability))
plot(hexbin (macroeconomic.factors$X91.day.Treasury.Bill.Yield, macroeconomic.factors$financial.stability))
plot(hexbin (macroeconomic.factors$PSC, macroeconomic.factors$financial.stability))
plot(hexbin (macroeconomic.factors$M3, macroeconomic.factors$financial.stability))
plot(hexbin (macroeconomic.factors$M2, macroeconomic.factors$financial.stability))
plot(hexbin (macroeconomic.factors$Inflation, macroeconomic.factors$financial.stability))
plot(hexbin (macroeconomic.factors$Domestic.Credit, macroeconomic.factors$financial.stability))
plot(hexbin (macroeconomic.factors$total.exports, macroeconomic.factors$financial.stability))
plot(hexbin (macroeconomic.factors$govt.treasury, macroeconomic.factors$financial.stability))
plot(hexbin (macroeconomic.factors$foreign.reserves, macroeconomic.factors$financial.stability))
#OLS Model Fitting ##Prediction of the Macroeconomic determinants of
Financial Stability in Uganda
mod1<-lm(macroeconomic.factors$financial.stability~macroeconomic.factors$exchange.rate+macroeconomic.factors$Rediscount.Rate+macroeconomic.factors$Lending.Rate+macroeconomic.factors$X91.day.Treasury.Bill.Yield+macroeconomic.factors$PSC+macroeconomic.factors$M3+macroeconomic.factors$M2+macroeconomic.factors$Inflation+macroeconomic.factors$total.exports+macroeconomic.factors$govt.treasury+macroeconomic.factors$foreign.reserves)
summary(mod1)
##
## Call:
## lm(formula = macroeconomic.factors$financial.stability ~ macroeconomic.factors$exchange.rate +
## macroeconomic.factors$Rediscount.Rate + macroeconomic.factors$Lending.Rate +
## macroeconomic.factors$X91.day.Treasury.Bill.Yield + macroeconomic.factors$PSC +
## macroeconomic.factors$M3 + macroeconomic.factors$M2 + macroeconomic.factors$Inflation +
## macroeconomic.factors$total.exports + macroeconomic.factors$govt.treasury +
## macroeconomic.factors$foreign.reserves)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.87787 -0.36825 0.04592 0.38798 1.77996
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 8.592e+00 1.158e+00 7.420
## macroeconomic.factors$exchange.rate 6.905e-04 5.346e-04 1.292
## macroeconomic.factors$Rediscount.Rate -9.944e-02 5.381e-02 -1.848
## macroeconomic.factors$Lending.Rate 8.553e-02 2.589e-02 3.304
## macroeconomic.factors$X91.day.Treasury.Bill.Yield 1.283e-02 5.694e-02 0.225
## macroeconomic.factors$PSC 1.164e-03 1.826e-04 6.374
## macroeconomic.factors$M3 -1.461e-03 4.655e-04 -3.138
## macroeconomic.factors$M2 1.143e-03 5.477e-04 2.087
## macroeconomic.factors$Inflation -1.480e-02 6.094e-03 -2.429
## macroeconomic.factors$total.exports -6.006e-06 1.759e-03 -0.003
## macroeconomic.factors$govt.treasury -3.901e-04 2.513e-04 -1.553
## macroeconomic.factors$foreign.reserves 1.548e-03 2.135e-04 7.252
## Pr(>|t|)
## (Intercept) 1.24e-10 ***
## macroeconomic.factors$exchange.rate 0.20033
## macroeconomic.factors$Rediscount.Rate 0.06836 .
## macroeconomic.factors$Lending.Rate 0.00144 **
## macroeconomic.factors$X91.day.Treasury.Bill.Yield 0.82236
## macroeconomic.factors$PSC 1.19e-08 ***
## macroeconomic.factors$M3 0.00240 **
## macroeconomic.factors$M2 0.04014 *
## macroeconomic.factors$Inflation 0.01742 *
## macroeconomic.factors$total.exports 0.99728
## macroeconomic.factors$govt.treasury 0.12454
## macroeconomic.factors$foreign.reserves 2.60e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7099 on 78 degrees of freedom
## Multiple R-squared: 0.937, Adjusted R-squared: 0.9281
## F-statistic: 105.5 on 11 and 78 DF, p-value: < 2.2e-16
summary.aov(mod1)
## Df Sum Sq Mean Sq F value
## macroeconomic.factors$exchange.rate 1 425.2 425.2 843.920
## macroeconomic.factors$Rediscount.Rate 1 3.1 3.1 6.105
## macroeconomic.factors$Lending.Rate 1 32.4 32.4 64.367
## macroeconomic.factors$X91.day.Treasury.Bill.Yield 1 15.4 15.4 30.569
## macroeconomic.factors$PSC 1 14.7 14.7 29.254
## macroeconomic.factors$M3 1 37.7 37.7 74.887
## macroeconomic.factors$M2 1 15.0 15.0 29.816
## macroeconomic.factors$Inflation 1 9.7 9.7 19.275
## macroeconomic.factors$total.exports 1 4.4 4.4 8.684
## macroeconomic.factors$govt.treasury 1 0.4 0.4 0.831
## macroeconomic.factors$foreign.reserves 1 26.5 26.5 52.597
## Residuals 78 39.3 0.5
## Pr(>F)
## macroeconomic.factors$exchange.rate < 2e-16 ***
## macroeconomic.factors$Rediscount.Rate 0.01566 *
## macroeconomic.factors$Lending.Rate 8.50e-12 ***
## macroeconomic.factors$X91.day.Treasury.Bill.Yield 4.13e-07 ***
## macroeconomic.factors$PSC 6.74e-07 ***
## macroeconomic.factors$M3 5.07e-13 ***
## macroeconomic.factors$M2 5.46e-07 ***
## macroeconomic.factors$Inflation 3.51e-05 ***
## macroeconomic.factors$total.exports 0.00423 **
## macroeconomic.factors$govt.treasury 0.36483
## macroeconomic.factors$foreign.reserves 2.60e-10 ***
## Residuals
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
predicted.mod1<-predict(mod1)#generates a vector of predicted values
residual.mod1<-residuals(mod1)
plot(residual.mod1~predicted.mod1)
#Regression coefficient plot
mplot(mod1, which =7, rows=-1)
oldpar = par(mfrow=c(2, 2), mar=c(4, 4, 2, 2) + .1)
plot(mod1); par(oldpar)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
END