Skip to content

Commit

Permalink
Updated dat files.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhiginbotham committed Apr 28, 2016
1 parent 31fed4b commit ab5f8e2
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 19 deletions.
45 changes: 45 additions & 0 deletions Power-Series/data/PRAD.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Q2(GeV2/c2) GE dGE
0.00790435 0.999295 0.000226169
0.012875 0.998054 0.000327208
0.0190242 0.997979 0.000440119
0.0263684 0.99773 0.000564046
0.0316128 0.995386 0.000344603
0.0348699 0.997223 0.000698296
0.0445541 0.994514 0.000842377
0.0514877 0.993587 0.000507705
0.0554199 0.993713 0.000995877
0.0674657 0.992831 0.00115846
0.0760697 0.990565 0.000694686
0.0806893 0.987654 0.00132984
0.0950589 0.98856 0.00150973
0.105421 0.987664 0.000904872
0.11063 0.98374 0.00169804
0.127338 0.980631 0.00189448
0.139387 0.982618 0.00113732
0.154068 0.980602 0.00162444
0.178067 0.978698 0.00139172
0.194474 0.969711 0.00195821
0.221449 0.971109 0.00166763
0.239514 0.970108 0.00231671
0.26952 0.964009 0.0019645
0.289057 0.96136 0.00269927
0.322267 0.958946 0.00228196
0.343273 0.960918 0.00310608
0.379556 0.950858 0.00261942
0.402031 0.946984 0.0035361
0.4416 0.945822 0.00297667
0.465169 0.946496 0.00398828
0.508132 0.935678 0.00335294
0.532762 0.935251 0.00446375
0.604917 0.935283 0.00496115
0.614183 0.92707 0.00332218
0.6813 0.915125 0.00548047
0.775052 0.90622 0.00407501
0.953374 0.881387 0.00488426
1.14996 0.868514 0.00575053
1.36426 0.840808 0.00666317
1.59555 0.822354 0.00761786
1.8445 0.801601 0.00860429
2.10985 0.795157 0.00961182
2.39179 0.765816 0.0106459
2.69001 0.749816 0.0116946
19 changes: 19 additions & 0 deletions Power-Series/data/park.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Test Data From Kijun Park
1.2500e-02 4.20800753e-01 1.15049633e-02
1.7500e-02 3.93666571e-01 1.30981921e-02
2.2500e-02 3.81220854e-01 1.34126011e-02
2.7500e-02 3.68224314e-01 1.37290240e-02
3.2500e-02 3.44132413e-01 1.37151250e-02
3.7500e-02 3.32971286e-01 1.44902500e-02
4.2500e-02 3.18970437e-01 1.53267661e-02
4.7500e-02 3.04855619e-01 1.63178134e-02
5.2500e-02 2.89261062e-01 1.71898353e-02
5.7500e-02 2.75038111e-01 1.81024761e-02
6.2500e-02 2.72934994e-01 1.94750503e-02
6.7500e-02 2.59238019e-01 2.03586253e-02
7.2500e-02 2.46670965e-01 2.12533274e-02
7.7500e-02 2.33314422e-01 2.20380721e-02
8.2500e-02 2.27192643e-01 2.31022357e-02
8.7500e-02 2.16559797e-01 2.38960303e-02
9.2500e-02 2.10059491e-01 2.48646248e-02

10 changes: 10 additions & 0 deletions Power-Series/data/park2.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Test Data From Kijun Park
1.2500e-02 4.20800753e-01 1.15049633e-02
1.7500e-02 3.93666571e-01 1.30981921e-02
2.2500e-02 3.81220854e-01 1.34126011e-02
2.7500e-02 3.68224314e-01 1.37290240e-02
3.2500e-02 3.44132413e-01 1.37151250e-02
3.7500e-02 3.32971286e-01 1.44902500e-02
4.2500e-02 3.18970437e-01 1.53267661e-02
4.7500e-02 3.04855619e-01 1.63178134e-02

26 changes: 7 additions & 19 deletions Power-Series/maclaurin.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,22 @@
# of statistical models for a given set of data. Since AIC estimates the quality
# of each model, AIC provides a tool for model selection even for non-nested
# models.
#
# In this code, we make use of the Akaike information criterion to decide
# the Maclaurin series to use for describing a given set of data.
#
# Pick the data to read
#
# readinteger <- function()
#{
# n <- readline(prompt="Enter an integer: ")
# if(!grepl("^[0-9]+$",n))
# {
# return(readinteger())
# }
#
# return(as.integer(n))
#}
#print(readinteger())
#print(n)
#
# Read the data
#
#data <- read.table("data/ge-mainz14.dat", header=TRUE , col.names = c("x", "y", "dy"))
data <- read.table("data/ge-lowQ2.dat", header=TRUE , col.names = c("x", "y", "dy"))
#data <- read.table("data/ge-lowQ2.dat", header=TRUE , col.names = c("x", "y", "dy"))
#data <- read.table("data/park2.dat", header=TRUE , col.names = c("x", "y", "dy"))
#data <- read.table("data/default.dat", header=TRUE, col.names = c("x", "y", "dy"))
#data <- read.table("data/PRAD-projected.dat", header=TRUE, col.names = c("x", "y", "dy"))
data <- read.table("data/PRAD.dat", header=TRUE , col.names = c("x", "y", "dy"))
#data <- read.table("data/ge.dat", header=FALSE , col.names = c("x", "y", "dy"))
#data <- read.table("data/Bevington.dat", header=TRUE , col.names = c("x", "y", "dy"))
#
message("")
message("Data has been read.")
message("")

# Define the mininum model.
#
min.model <- lm(data$y ~ data$x, weight=1/data$dy^2)
Expand Down

0 comments on commit ab5f8e2

Please sign in to comment.