# date notkept hosts
1399003199 50 10
1399089599 63 11
1399175999 120 12
1399262399 55 20
1399348799 60 22
1399435199 63 25
1399521599 52 24
####
!/usr/bin/gnuplot
set xlabel "Date"
set ylabel "Count"
set autoscale
p(x) = m1*x + b1
fit p(x) 'test.dat' using 1:2 via m1, b1
plot 'test.dat' using 1:2, p(x)
####
Final set of parameters Asymptotic Standard Error
======================= ==========================
m1 = 4.65548e-08 +/- 5.823e-05 (1.251e+05%)
b1 = 1 +/- 8.148e+04 (8.148e+06%)
####
#!/usr/bin/gnuplot
set xlabel "Date"
set ylabel "Count"
set autoscale
p(x) = m1*x + b1
m1 = -1e-5
b1 = 30000
fit p(x) 'test.dat' using 1:2 via m1, b1
plot 'test.dat' using 1:2, p(x)
####
Final set of parameters Asymptotic Standard Error
======================= ==========================
m1 = -2.13926e-05 +/- 5.736e-05 (268.1%)
b1 = 30000 +/- 8.027e+04 (267.6%)
####
#!/usr/bin/gnuplot
set xlabel "Date"
set ylabel "Count"
set autoscale
p(x) = m1 * (x / 1399003199) + b1
fit p(x) 'test.dat' using 1:2 via m1, b1
plot 'test.dat' using 1:2, p(x)
####
Final set of parameters Asymptotic Standard Error
======================= ==========================
m1 = -31227.8 +/- 8.025e+04 (257%)
b1 = 31299.7 +/- 8.026e+04 (256.4%)
####
> x
[1] 1399003199 1399089599 1399175999 1399262399 1399348799
[6] 1399435199 1399521599
> y
[1] 50 63 120 55 60 63 52
> lm(y ~ x)
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
3.130e+04 -2.232e-05
> m <- lm(y ~ x)
> summary(m)
Call:
lm(formula = y ~ x)
Residuals:
1 2 3 4 5 6 7
-21.9286 -7.0000 51.9286 -11.1429 -4.2143 0.7143 -8.3571
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.130e+04 8.026e+04 0.390 0.713
x -2.232e-05 5.736e-05 -0.389 0.713
Residual standard error: 26.22 on 5 degrees of freedom
Multiple R-squared: 0.0294, Adjusted R-squared: -0.1647
F-statistic: 0.1514 on 1 and 5 DF, p-value: 0.7132