Skip to content

Commit

Permalink
20240520 - fix blandr error
Browse files Browse the repository at this point in the history
  • Loading branch information
isaactpetersen committed May 21, 2024
1 parent 7187871 commit 8b4e13a
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions 05-Reliability.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -1164,8 +1164,8 @@ The Bland-Altman plot was created using the `blandr` package [@R-blandr].\index{

```{r}
BAstats <- blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)
mydata$time1, #method1
mydata$time2) #method2
BAplotlimits <- blandr.plot.limits(BAstats)
```

Expand Down Expand Up @@ -1961,16 +1961,16 @@ cor.test(x = mydata$time1, y = mydata$time2)
```{r}
qnorm(.975) * sd(
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$differences, na.rm = TRUE)
mydata$time1,
mydata$time2)$differences, na.rm = TRUE)
```

#### Bias {#noError-bias}

```{r}
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$bias
mydata$time1,
mydata$time2)$bias
```

### Add within-person random error {#withinPersonRandomError-example}
Expand Down Expand Up @@ -2022,17 +2022,17 @@ cor.test(x = mydata$time1, y = mydata$time2)
```{r}
qnorm(.975) * sd(
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$differences,
mydata$time1,
mydata$time2)$differences,
na.rm = TRUE)
```

#### Bias {#withinPersonRandomError-bias}

```{r}
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$bias
mydata$time1,
mydata$time2)$bias
```

#### Findings {#withinPersonRandomError-findings}
Expand Down Expand Up @@ -2091,17 +2091,17 @@ cor.test(x = mydata$time1, y = mydata$time2)
```{r}
qnorm(.975) * sd(
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$differences,
mydata$time1,
mydata$time2)$differences,
na.rm = TRUE)
```

#### Bias {#withinPersonSystematicError-bias}

```{r}
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$bias
mydata$time1,
mydata$time2)$bias
```

#### Findings {#withinPersonSystematicError-findings}
Expand Down Expand Up @@ -2158,17 +2158,17 @@ cor.test(x = mydata$time1, y = mydata$time2)
```{r}
qnorm(.975) * sd(
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$differences,
mydata$time1,
mydata$time2)$differences,
na.rm = TRUE)
```

#### Bias {#betweenPersonRandomError-bias}

```{r}
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$bias
mydata$time1,
mydata$time2)$bias
```

#### Findings {#betweenPersonRandomError-findings}
Expand Down Expand Up @@ -2224,17 +2224,17 @@ cor.test(
```{r}
qnorm(.975) * sd(
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$differences,
mydata$time1,
mydata$time2)$differences,
na.rm = TRUE)
```

#### Bias {#betweenPersonSystematicError-bias}

```{r}
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$bias
mydata$time1,
mydata$time2)$bias
```

#### Findings {#betweenPersonSystematicError-findings}
Expand Down Expand Up @@ -2292,16 +2292,16 @@ cor.test(x = mydata$time1,
```{r}
qnorm(.975) * sd(
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$differences, na.rm = TRUE)
mydata$time1,
mydata$time2)$differences, na.rm = TRUE)
```

#### Bias {#constantVariance-bias}

```{r}
blandr.statistics(
method1 = mydata$time1,
method2 = mydata$time2)$bias
mydata$time1,
mydata$time2)$bias
```

#### Findings {#constantVariance-findings}
Expand Down Expand Up @@ -2717,7 +2717,7 @@ cor(cnlsy[,c("bpi_antisocialT1Sum","bpi_antisocialT2Sum")], use = "pairwise.comp
# Repeatability -----------------------------------------------------------
# Bland-Altman Plot
BAstats_ex <- blandr.statistics(method1 = cnlsy$bpi_antisocialT1Sum, method2 = cnlsy$bpi_antisocialT2Sum)
BAstats_ex <- blandr.statistics(cnlsy$bpi_antisocialT1Sum, cnlsy$bpi_antisocialT2Sum)
BAplotlimits_ex <- blandr.plot.limits(BAstats_ex)
blandr.plot.rplot(BAstats_ex, plot.limits = BAplotlimits_ex, annotate = TRUE, method1name = "BPI_T1", method2name = "BPI_T2")
Expand Down

0 comments on commit 8b4e13a

Please sign in to comment.