#Packages
#install.packages("multcomp") #To do multiple comparistion in anova/glth
library(multcomp)
require(mvtnorm)
require(survival)
require(TH.data)


#1)Data Set up
Origin=read.table(file="E:\\R Code files\\R Data Sets\\DummyVariable-Three.csv",header=T,sep=",")
names(Origin)
## [1] "Days" "Geo"  "W"
attach(Origin)


#2)Creating a Regression Equation(a0+a1X+a2z1+a3Z2)
DV3=lm(W ~ .,data = Origin)
summary(DV3)
## 
## Call:
## lm(formula = W ~ ., data = Origin)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.37353 -0.15294  0.01103  0.17868  0.47353 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.48750    0.67340  -0.724    0.487    
## Days         0.48676    0.02574  18.908 1.49e-08 ***
## GeoB        -0.27353    0.21844  -1.252    0.242    
## GeoC         1.91838    0.20180   9.506 5.45e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3002 on 9 degrees of freedom
## Multiple R-squared:  0.9794, Adjusted R-squared:  0.9726 
## F-statistic: 142.8 on 3 and 9 DF,  p-value: 6.6e-08