Last active
August 29, 2015 14:24
-
-
Save anandthakker/d1126b00ab3c17082abf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nightlystats <- read.csv("summaries/nightly-stats.csv", header=F, | |
col.names=c('year', | |
'month', | |
'day', | |
'satellite', | |
'filtered_count', | |
'raw_count', | |
'mean', | |
'min', | |
'median', | |
'max', | |
'var', | |
'li_median', | |
'li_mean')) | |
nightlystats$year <- factor(nightlystats$year) | |
nightlystats$satellite <- factor(nightlystats$satellite) # not strictly necessary | |
reg <- lm(median ~ satellite + year, data=nightlystats) | |
summary(reg) | |
# Results: | |
# Call: | |
# lm(formula = median ~ satellite + year, data = nightlystats) | |
# | |
# Residuals: | |
# Min 1Q Median 3Q Max | |
# -6.302 -1.211 -0.320 0.769 46.297 | |
# | |
# Coefficients: (1 not defined because of singularities) | |
# Estimate Std. Error t value Pr(>|t|) | |
# (Intercept) 4.90106 0.13053 37.546 < 2e-16 *** | |
# satelliteF12 1.24454 0.22390 5.558 2.78e-08 *** | |
# satelliteF14 -0.02109 0.24017 -0.088 0.930013 | |
# satelliteF15 0.19450 0.24766 0.785 0.432269 | |
# satelliteF16 0.68629 0.25692 2.671 0.007568 ** | |
# satelliteF18 1.18883 0.17488 6.798 1.11e-11 *** | |
# year1994 -0.43352 0.18176 -2.385 0.017092 * | |
# year1995 -0.41436 0.26986 -1.535 0.124703 | |
# year1996 -0.87146 0.28669 -3.040 0.002373 ** | |
# year1997 -0.67735 0.27817 -2.435 0.014907 * | |
# year1998 -0.36024 0.27601 -1.305 0.191856 | |
# year1999 -0.38467 0.27612 -1.393 0.163615 | |
# year2000 0.15619 0.27711 0.564 0.573016 | |
# year2001 0.89961 0.28618 3.143 0.001674 ** | |
# year2002 0.38824 0.28617 1.357 0.174917 | |
# year2003 -0.88476 0.28576 -3.096 0.001965 ** | |
# year2004 -1.21241 0.28562 -4.245 2.20e-05 *** | |
# year2005 -0.98255 0.29295 -3.354 0.000799 *** | |
# year2006 -1.57296 0.29295 -5.369 8.05e-08 *** | |
# year2007 -0.72703 0.29327 -2.479 0.013188 * | |
# year2008 -0.73946 0.31085 -2.379 0.017384 * | |
# year2009 -1.26719 0.31954 -3.966 7.36e-05 *** | |
# year2010 0.55277 0.16402 3.370 0.000754 *** | |
# year2011 -0.85848 0.16379 -5.241 1.62e-07 *** | |
# year2012 0.16702 0.16391 1.019 0.308232 | |
# year2013 NA NA NA NA | |
# --- | |
# Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 | |
# | |
# Residual standard error: 2.196 on 11587 degrees of freedom | |
# Multiple R-squared: 0.1203, Adjusted R-squared: 0.1184 | |
# F-statistic: 66 on 24 and 11587 DF, p-value: < 2.2e-16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment