This code is just for visualizing the findings rather than running model.
Load packages
Load Data
load("dat_new2.RData")
Visualize vermont causal flows
gn_vm
Visualize Seattle causal flows
gn_sea
SEATTLE
par(mfrow = c(1, 2))
varImpPlot(rf.tree.sea.out,main = "Seattle, Out TE")
varImpPlot(rf.tree.sea.out_w,main = "Seattle, Weighted Out TE")
Focus on those which spread out rooftop PV - Dependent variable: % of out-going causal connections among neighboring tracts - Housing-related variables such as SingleFamily, HomeOwn are more important than economic variables (wealth, income) - Inclination to adopt technology from diverse tracts is important on spreading rooftop PV to more diverse tracts (Ininfoa). - Neighborhood diffusion is not critical on spreading-out behaviors. - How clustered the adoption occurs is not important (Clustered)
par(mfrow = c(1, 2))
varImpPlot(rf.tree.sea.in,main = "Seattle, In TE")
varImpPlot(rf.tree.sea.in_w,main = "Seattle, Weighted In TE")
Focus on those which spread in rooftop PV - Dependent variable: % of in-coming causal connections among neighboring tracts - How risked you are from natural disasters becomes important for those who are adopting rooftop PV (RiskScore) - Neighborhood diffusion is not critical on spreading-in behaviors. - How clustered the adoption occurs is not important (Clustered)
par(mfrow = c(1, 2))
varImpPlot(rf.tree.sea.mi,main = "Seattle, MI")
varImpPlot(rf.tree.sea.mi_w,main = "Seattle, Weighted MI")
Focus on those which self-loop rooftop PV - Dependent variable: existence of self-reinforcing adoption within a tract - Housing related variables are still important - Self-reinforcement is quite independent from tract-tract spreading (decoupled)
VERMONT
par(mfrow = c(1, 2))
varImpPlot(rf.tree.vm.out,main = "Vermont, Out TE")
varImpPlot(rf.tree.vm.out_w,main = "Vermont, Weighted Out TE")
par(mfrow = c(1, 2))
varImpPlot(rf.tree.vm.in,main = "Vermont, In TE")
varImpPlot(rf.tree.vm.in_w,main = "Vermont, Weighted In TE")
par(mfrow = c(1, 2))
varImpPlot(rf.tree.vm.mi,main = "Vermont, MI")
varImpPlot(rf.tree.vm.mi_w,main = "Vermont, Weighted MI")