Skip to content

Commit

Permalink
change to quarto version
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfoxcroft committed Oct 25, 2022
1 parent 882ecf3 commit 324152f
Show file tree
Hide file tree
Showing 876 changed files with 31,590 additions and 35,115 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
docs/
**/.Rhistory
**/lsr.ps
**/.DS_Store
.Rproj.user
.Rproj.user/
.Rhistory
.RData
.Ruserdata
.quarto/
*.rds
/.quarto/
Empty file added .nojekyll
Empty file.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# (PART) An introduction to jamovi {-}

# Getting started with jamovi

```{r}
#| include: FALSE
source("header.R")
```

> *Robots are nice to work with.*\
> -- Roger Zelazny[^getting-started-with-jamovi-1]
Expand All @@ -24,16 +27,19 @@ Those are the main reasons I use jamovi. It's not without its flaws, though. It'

Okay, enough with the sales pitch. Let's get started. Just as with any piece of software, jamovi needs to be installed on a "computer", which is a magical box that does cool things and delivers free ponies. Or something along those lines; I may be confusing computers with the iPad marketing campaigns. Anyway, jamovi is freely distributed online and you can download it from the jamovi homepage, which is: <https://www.jamovi.org/>

At the top of the page, under the heading "Download", you'll see separate links for Windows users, Mac users, and Linux users. If you follow the relevant link you'll see that the online instructions are pretty self-explanatory. As of this writing, the current version of jamovi is 0.9, but they usually issue updates every few months, so you'll probably have a newer version.[^getting-started-with-jamovi-3]
At the top of the page, under the heading "Download", you'll see separate links for Windows users, Mac users, and Linux users. If you follow the relevant link you'll see that the online instructions are pretty self-explanatory. As of this writing, the current version of jamovi is 2.3, but they usually issue updates every few months, so you'll probably have a newer version.[^getting-started-with-jamovi-3]

[^getting-started-with-jamovi-3]: Although jamovi is updated frequently it doesn't usually make much of a difference for the sort of work we'll do in this book. In fact, during the writing of the book I upgraded several times and it didn't make much difference at all to what is in this book.

### Starting up jamovi

One way or another, regardless of what operating system you're using, it's time to open jamovi and get started. When first starting jamovi you will be presented with a user interface which looks something like Figure \@ref(fig:fig3-1).
One way or another, regardless of what operating system you're using, it's time to open jamovi and get started. When first starting jamovi you will be presented with a user interface which looks something like @fig-fig3-1.

```{r fig3-1, class.chunk="enlarge-image", echo=FALSE, fig.cap="jamovi starts up!", out.width = "90%"}
knitr::include_graphics("images/Figure2.PNG")
```{r}
#| label: fig-fig3-1
#| fig-width: 90
#| fig-cap: jamovi starts up!
knitr::include_graphics("images/fig3-1.png")
```

To the left is the spreadsheet view, and to the right is where the results of statistical tests appear. Down the middle is a bar separating these two regions and this can be dragged to the left or the right to change their sizes.
Expand All @@ -54,10 +60,13 @@ In jamovi data is represented in a spreadsheet with each column representing a '

### Variables

The most commonly used variables in jamovi are 'Data Variables', these variables simply contain data either loaded from a data file, or 'typed in' by the user. Data variables can be one of several measurement levels (Figure \@ref(fig:fig3-2)).
The most commonly used variables in jamovi are 'Data Variables', these variables simply contain data either loaded from a data file, or 'typed in' by the user. Data variables can be one of several measurement levels (@fig-fig3-2).

```{r fig3-2, echo=FALSE, fig.cap="measurement levels", out.width = "90%"}
knitr::include_graphics("images/Figure3.PNG")
```{r}
#| label: fig-fig3-2
#| fig-width: 90
#| fig-cap: measurement levels
knitr::include_graphics("images/fig3-2.png")
```

These levels are designated by the symbol in the header of the variable's column. The ID variable type is unique to jamovi. It's intended for variables that contain identifiers that you would almost never want to analyse. For example, a persons name, or a participant ID. Specifying an ID variable type can improve performance when interacting with very large data sets.
Expand All @@ -82,12 +91,20 @@ Computed Variables are those which take their value by performing a computation

Computed variables can be added to the data set with the 'add' button available on the data tab. This will produce a formula box where you can specify the formula. The usual arithmetic operators are available. Some examples of formulas are:

A + B LOG10(len) MEAN(A, B) (dose - VMEAN(dose)) / VSTDEV(dose)
A + B
LOG10(len)
MEAN(A, B)
(len - VMEAN(len)) / VSTDEV(len)

In order, these are the sum of A and B, a log (base 10) transform of len, the mean of A and B, and the z-score of the variable len[^getting-started-with-jamovi-0]. @fig-fig3-3 shows the jamovi screen for the new variable computed as the z-score of len (from the 'Tooth Growth' example data set).

In order, these are the sum of A and B, a log (base 10) transform of len, the mean of A and B, and the z-score of the variable dose. Figure \@ref(fig:fig3-3) shows the jamovi screen for the new variable computed as the z-score of dose (from the 'Tooth Growth' example data set).
[^getting-started-with-jamovi-0]: In later versions of jamovi there is a pre-defined function 'Z' to compute z-scores, which is much easier!

```{r fig3-3, class.chunk="enlarge-image", echo=FALSE, fig.cap="A newly computed variable, the z-score of ‘dose’", out.width = "90%"}
knitr::include_graphics("images/Figure4.PNG")
```{r}
#| label: fig-fig3-3
#| fig-width: 90
#| fig-cap: A newly computed variable, the z-score of ‘dose’
knitr::include_graphics("images/fig3-3.png")
```

#### V-functions
Expand Down Expand Up @@ -116,16 +133,22 @@ There are also several other kinds of data file that you might want to import in

### Importing data from csv files

One quite commonly used data format is the humble "comma separated value" file, also called a csv file, and usually bearing the file extension .csv. csv files are just plain old-fashioned text files and what they store is basically just a table of data. This is illustrated in Figure \@ref(fig:fig3-4), which shows a file called booksales.csv that I've created. As you can see, each row represents the book sales data for one month. The first row doesn't contain actual data though, it has the names of the variables.
One quite commonly used data format is the humble "comma separated value" file, also called a csv file, and usually bearing the file extension .csv. csv files are just plain old-fashioned text files and what they store is basically just a table of data. This is illustrated in @fig-fig3-4, which shows a file called booksales.csv that I've created. As you can see, each row represents the book sales data for one month. The first row doesn't contain actual data though, it has the names of the variables.

```{r fig3-4, class.chunk="enlarge-image", echo=FALSE, fig.cap="The booksales.csv data file. On the left I have opened the file using a spreadsheet program (OpenOffice), which shows that the file is basically a table. On the right the same file is open in a standard text editor (the TextEdit program on a Mac), which shows how the file is formatted. The entries in the table are wrapped in quote marks and separated by commas", out.width = "90%"}
knitr::include_graphics("images/Figure5.PNG")
```{r}
#| label: fig-fig3-4
#| fig-width: 90
#| fig-cap: The booksales.csv data file. On the left I have opened the file using a spreadsheet program (OpenOffice), which shows that the file is basically a table. On the right the same file is open in a standard text editor (the TextEdit program on a Mac), which shows how the file is formatted. The entries in the table are wrapped in quote marks and separated by commas
knitr::include_graphics("images/fig3-4.png")
```

It's easy to open csv files in jamovi. From the top left menu (the button with three parallel lines) choose 'Open' and browse to where you have stored the csv file on your computer. If you're on a Mac, it'll look like the usual Finder window that you use to choose a file; on Windows it looks like an Explorer window. An example of what it looks like on a Mac is shown in Figure \@ref(fig:fig3-5). I'm assuming that you're familiar with your own computer, so you should have no problem finding the csv file that you want to import! Find the one you want, then click on the "Open" button.
It's easy to open csv files in jamovi. From the top left menu (the button with three parallel lines) choose 'Open' and browse to where you have stored the csv file on your computer. If you're on a Mac, it'll look like the usual Finder window that you use to choose a file; on Windows it looks like an Explorer window. An example of what it looks like on a Mac is shown in @fig-fig3-5. I'm assuming that you're familiar with your own computer, so you should have no problem finding the csv file that you want to import! Find the one you want, then click on the "Open" button.

```{r fig3-5, class.chunk="enlarge-image", echo=FALSE, fig.cap="A dialog box on a Mac asking you to select the csv file jamovi should try to import. Mac users will recognise this immediately, it's the usual way in which a Mac asks you to find a file. Windows users won't see this, instead they'll see the usual explorer window that Windows always gives you when it wants you to select a file", out.width = "90%"}
knitr::include_graphics("images/Figure6.PNG")
```{r}
#| label: fig-fig3-5
#| fig-width: 90
#| fig-cap: A dialog box on a Mac asking you to select the csv file jamovi should try to import. Mac users will recognise this immediately, it's the usual way in which a Mac asks you to find a file. Windows users won't see this, instead they'll see the usual explorer window that Windows always gives you when it wants you to select a file
knitr::include_graphics("images/fig3-5.png")
```

There are a few things that you can check to make sure that the data gets imported correctly:
Expand Down Expand Up @@ -162,7 +185,7 @@ And that's pretty much it, at least as far as SPSS goes. As far as other statist

A different problem is posed by Excel files. Despite years of yelling at people for sending data to me encoded in a proprietary data format, I get sent a lot of Excel files. The way to handle Excel files is to open them up first in Excel or another spreadsheet programme that can handle Excel files, and then export the data as a csv file before opening / importing the csv file into jamovi.

## Changing data from one level to another
## Changing data from one level to another {#sec-Changing-data-from-one-level-to-another}

Sometimes you want to change the variable level. This can happen for all sorts of reasons. Sometimes when you import data from files, it can come to you in the wrong format. Numbers sometimes get imported as nominal, text values. Dates may get imported as text. ParticipantID values can sometimes be read as continuous: nominal values can sometimes be read as ordinal or even continuous. There's a good chance that sometimes you'll want to convert a variable from one measurement level into another one. Or, to use the correct term, you want to **coerce** the variable from one class into another.

Expand All @@ -172,10 +195,13 @@ Earlier we saw how to specify different variable levels, and if you want to chan

A really great feature of jamovi is the ability to install add-on modules from the jamovi library. These add-on modules have been developed by the jamovi community, i.e., jamovi users and developers who have created special software add-ons that do other, usually more advanced, analyses that go beyond the capabilities of the base jamovi program.

To install add-on modules, just click on the large $+$ in the top right of the jamovi window, select "jamovi-library" and then browse through the various add-on modules that are available. Choose the one(s) you want, and then install them, as in Figure \@ref(fig:fig3-6). It's that easy. The newly installed modules can then be accessed from the "Analyses" button bar. Try it...useful add-on modules to install include "scatr" (added under "Descriptives") and $R_j$.
To install add-on modules, just click on the large $+$ in the top right of the jamovi window, select "jamovi-library" and then browse through the various add-on modules that are available. Choose the one(s) you want, and then install them, as in @fig-fig3-6. It's that easy. The newly installed modules can then be accessed from the "Analyses" button bar. Try it...useful add-on modules to install include "scatr" (added under "Descriptives") and $R_j$.

```{r fig3-6, class.chunk="enlarge-image", echo=FALSE, fig.cap="Installing add-on modules in jamovi", out.width = "90%"}
knitr::include_graphics("images/Figure7.PNG")
```{r}
#| label: fig-fig3-6
#| fig-width: 90
#| fig-cap: Installing add-on modules in jamovi
knitr::include_graphics("images/fig3-6.png")
```

## Quitting jamovi
Expand Down
Loading

0 comments on commit 324152f

Please sign in to comment.