xyplot(Velocity ~ Time | Experiment, data = d1, pch = “.”)
May 24, 2009
May 18, 2009
Monday: starting analysis …
Figured out how to arrange data yesterday to do analysis — yay!! — so starting on it today. However, think I need to read more about the statistical basics to make sure I undertand what’s going on. Namely what happens when you examine the P value for multiple variables, and some are <0.05 and some are 0.05?
May 15, 2009
Fri: lattice charts ….
Did some more testing on the velocity data last night — it appears to check out correctly, i.e. no inadvertent array copying/looping. Which is good.
Was going to create the velcoity data from the random boid experiments, but realised I need numpy installed on my PC, which I have at home and not at work, and work pc did not want to play ball today so … have emailed the data to myself and will do it over the w/e.
So turned to trying to actually create useful charts in R. Found this website which may be useful to start at a/ and proceed through, to understand what is supposed to be going on: http://www.stat.auckland.ac.nz/~paul/RGraphics/chapter4.pdf.
PS look at http://www.walware.de/goto/statet for an Eclipse plug-in re: R (and remember sweave!), with guide here: http://www.splusbook.com/Rintro/R_Eclipse_StatET.pdf
May 12, 2009
Tuesday: doubts on velocity data …
Over the w/e, the summarised velocity data was tested to make sure that it was correct. This involved testing all 10 runs of a single experiment, to make sure the data that was being summarised automatically matched a hand-calculated number. However, when looking at all the data created, it appears there is cyclical behaviour being observed: every 6 experiments, there is a crash in the velocities observed. So the question is: Is this due to the experimental settings, or due to the code? A sanity check of experimental run of stat11 and timestep 34 would be of interest, to see if it is working as believed ….
May 11, 2009
Monday: R-ing velocity data …
Spent the w/e getting the velocity data summarised, and testing code worked correctly. Now trying to graph it. Currently batlling to try and get all data onto a collection of charts, with the same chart scale to make comparison a little easier. So far, have come up with the assorted following list of commands:
- - File > Change dir
- - stat1 <- read.table(“Stat1_VelocityResults.txt”, header = FALSE, sep = “,”) # need to set HEADER to FALSE so that the timestep = 0 line is not read in; lines starting with ‘#’ appear to be read as comments, so are ignored
- - stat1[,2] # show 2nd column only
- - par(mfrow=c(5, 3), cex=0.6, mar=c(4, 4, 1, 1)) # create a graph area to plot charts in
- - plot(x,y, xlab=”x axis”, ylab=”y axis”, main=”my plot”, ylim=c(0,20), xlim=c(0,20), pch=15, col=”blue”) # example of what can be done to a chart. The xlim and ylim allow you to set an axis scale. pch sets the type of icon seen on the graph — see table of options at http://www.phaget4.org/R/plot.html.
- - c1 = cbind(d1,d2) # combine columns of data, i.e. concatenate tables vertically
- - colnames(x) <- c(“timestep”, “velocity”) # change the column names
- - stat2["timestep"] # show the column by name
- - stat2$timestep # another way to refer to the same column
- - stat2$timestep <- NULL # delete a column
Good links:
- http://osiris.sunderland.ac.uk/~cs0her/Statistics/UsingLatticeGraphicsInR.htm — details on graphics and using the lattice library
- http://www.daimi.au.dk/~besen/TBiB2007/lecture-notes/rpy.html – details on using RPy
- http://www.r-cookbook.com/node/11 – details on how to create LaTeX tables from R
May 7, 2009
Thursday: looking at velocity results …
Finally getting round to sorting out the velocity results. Currently looking at how the best way to proceed with each experiment. I think taking the full list of results — e.g. each boid velocity x 10 experimental runs => 1 big data set — and then working out standard deviation of this set. Found this on averaging standard deviations, but doesn’t seem to be the best way forwards.
As such started on summarising code — got to the point of needing to testing out the code, to make sure that the array extension worked okay. For tomorrow!