Posts

Jittering in R (ggplot2)

Image
Jittering is the act of adding random noise to data in order to prevent overplotting in statistical graphs. Overplotting can occur when a continuous measurement is rounded to a convenient unit. This has the effect of making a continuous variable appear like a discrete ordinal variable.  For example, age is measured in years and body weight is measured in pounds or kilograms.  A scatter plot of weight versus age, which includes a sufficiently large sample of people will involve considerable overlap. Many individuals may be recorded as, 29 years old and weighing 70 kg, and there will be many markers plotted at the point (29, 70). The same is often true when plotting other individual difference metrics throughout psychology (e.g. personality) (Figure 1). Figure 1: Before Jittering - a significant positive correlation between x & y [r = .37]. To alleviate overplotting, it is possible to add a small amount of random noise to the data...

State-Trait Anxiety Inventory (STAI): SPSS Script

The State-Trait Anxiety Inventory (STAI) is a psychological inventory based on a 4-point Likert scale and consists of 40 questions on a self-report basis.  Below is a short script for SPSS which will help speed up the coding process. A version that runs in  R is also in the pipeline.  All items should be labeled as separate numeric variables as stai1 and taiy1 ...etc The script computes and prints the results for all reverse scored items and then calculates and prints state and trait scores. It will also produce  Cronbach's Alpha  coefficients. The original scoring key for the STAI can be found  here . *Part 1 - reverse scoring of specific items COMPUTE stai1r = 5 - stai1. EXECUTE. COMPUTE stai2r = 5 - stai2. EXECUTE. COMPUTE stai5r = 5 - stai5. EXECUTE. COMPUTE stai8r = 5 - stai8. EXECUTE. COMPUTE stai10r = 5 - stai10. EXECUTE. COMPUTE stai11r = 5 - stai11. EXECUTE. COMPUTE stai15r = 5 - stai15. EXE...

Abandoned: The Old Primary School

Image
My former primary school has become a mini- chernobyl  (minus the radioactivity) after being abandoned in 2007. The site has been left to degrade as the local council is apparently unable to sell the land.  What fascinates me about this site is not the lack of human activity, but that it exists in the centre of a fully functioning town! Hidden away behind a handful of active council buildings, the barren and bleak landscape is all the more bewildering in the winter sun.  Larger versions of these photos can be downloaded on  Flickr .

Current Research - Undergraduate Supervision

Image
This year, I'm fortunate enough to be supervising a number of interesting projects. A few of these can be completed entirely online. I'm sure my students would be grateful if you have a few spare minutes to take part. Finally, if you chose to leave your email address at the end, we can keep you notified of the results! [CLOSED] Perceptions towards everyday temporal experiences Crime Anxiety Where's the worst place to position a tattoo? Attitudes towards video games Exploring attitudes towards older adults The Social Network

A universal skill-set for all psychologists?

A short list of skills for all psychologists aiming to become independent scientists. Compiled quickly following a brief discussion with a colleague.....last edited (16/10/2014) Input Original Thinking Web Development Critical Thinking PsychoPy Superlab Qualtrics Processing Sharing data with others MATLAB Python RStudio  (R) SPSS Excel NVIVO Output Talking Writing Dealing with Rejection (getting back on the horse) Developing detailed strands of work that are simultaneously placed into a wider context Developing Impact Powerpoint Keynote Prezi Adobe Creative Suite Tableau LaTeX Processing Misc Evernote Cloud Outliner Mendeley  (or any referencing software)

Students Still Love Facebook

Image
Earlier this year, my undergraduate research group surveyed a group of students in an attempt to find out how they spend their time online. They were also interested in how online social interaction might interact with personality. While personality didn't appear to predict how students use the internet, our sample was remarkably consistent when it came to documenting their typical behaviour online. Like many things in life, culture and groups dictate what becomes popular. Back in 2004, Myspace dominated but as the graph below shows, in 2014, Facebook still rules with Twitter in hot pursuit . Learn About Tableau

Word Clouds with Processing and R

Image
I've previously relied on  wordle.net to produce 'word clouds'. These clouds give greater prominence to words that appear more frequently in a source text. However, it is also possible to produce similar, highly customisable word clouds in Processing and R . Processing relies on the excellent  WordCram library. This is straightforward to install and can take any text file or website and produce a word cloud. The source code below demonstrates the variety of presentation options that are available. While the WordCram extension allows for some nice visual tricks, the text file has to be free of any undesirable additional variables or words that may need be excluded before creating a word cloud. In other words, Processing doesn't allow for any advanced text mining techniques e.g. you might want to remove all numbers or specific words form a file before producing a word cloud. R becomes more useful in this instance. Combining the tm  (text mining) and wordcloud p...