Skip to content

Commit

Permalink
Updated RMD files
Browse files Browse the repository at this point in the history
  • Loading branch information
yhoriuchi committed Jul 15, 2023
1 parent 925114b commit d2aca53
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 6 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion projoint.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
RnwWeave: knitr
LaTeX: pdfLaTeX

BuildType: Package
Expand Down
50 changes: 49 additions & 1 deletion vignettes/01-read-wrangle.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,53 @@ description: >
vignette: >
%\VignetteIndexEntry{Step 01: Read and wrangle data}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
\usepackage[utf8]{inputenc}
---

## Test

```{r}
library(tidyverse)
library(projoint)
```

# Data with the flipped repeated tasks

```{r}
outcomes <- str_c("choice", seq(from = 1, to = 8, by = 1))
outcomes <- c(outcomes, "choice1_repeated_flipped")
out1 <- reshape_conjoint(.data = exampleData1,
.idvar = "ResponseId",
.outcomes = outcomes,
.outcomes_ids = c("A", "B"),
.alphabet = "K",
.repeated = TRUE,
.flipped = TRUE)
```

# Data with the not-flipped repeated tasks

```{r}
outcomes <- str_c("choice", seq(from = 1, to = 8, by = 1))
outcomes <- c(outcomes, "choice1_repeated_notflipped")
out2 <- reshape_conjoint(.data = exampleData2,
.idvar = "ResponseId",
.outcomes = outcomes,
.outcomes_ids = c("A", "B"),
.alphabet = "K",
.repeated = TRUE,
.flipped = FALSE)
```

# Data without the repeated tasks

```{r}
outcomes <- str_c("choice", seq(from = 1, to = 8, by = 1))
out3 <- reshape_conjoint(.data = exampleData3,
.idvar = "ResponseId",
.outcomes = outcomes,
.outcomes_ids = c("A", "B"),
.alphabet = "K",
.repeated = FALSE,
.flipped = NULL)
```
32 changes: 31 additions & 1 deletion vignettes/02-predict-irr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,35 @@ description: >
vignette: >
%\VignetteIndexEntry{Step 02: Predict IRR}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
\usepackage[utf8]{inputenc}
---

Read, ...

```{r}
library(tidyverse)
```

```{r}
library(projoint)
```

```{r}
outcomes <- str_c("choice", seq(from = 1, to = 8, by = 1))
out3 <- reshape_conjoint(.data = exampleData3,
.idvar = "ResponseId",
.outcomes = outcomes,
.outcomes_ids = c("A", "B"),
.alphabet = "K",
.repeated = FALSE,
.flipped = NULL)
```

Then, ...

```{r}
predicted_irr <- predict_tau(out3$data)
predicted_irr$predicted
predicted_irr$figure
```
30 changes: 29 additions & 1 deletion vignettes/03-estimate-mm.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,33 @@ description: >
vignette: >
%\VignetteIndexEntry{Step 03: Estimate and correct MMs}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
\usepackage[utf8]{inputenc}
---


```{r}
library(tidyverse)
```

```{r}
library(projoint)
```

```{r}
outcomes <- str_c("choice", seq(from = 1, to = 8, by = 1))
outcomes <- c(outcomes, "choice1_repeated_flipped")
out1 <- reshape_conjoint(.data = exampleData1,
.idvar = "ResponseId",
.outcomes = outcomes,
.outcomes_ids = c("A", "B"),
.alphabet = "K",
.repeated = TRUE,
.flipped = TRUE)
```


```{r}
d <- out1$data
```


2 changes: 1 addition & 1 deletion vignettes/04-estimate-amce.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ description: >
vignette: >
%\VignetteIndexEntry{Step 04: Estimate and correct AMCEs}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
\usepackage[utf8]{inputenc}
---
2 changes: 1 addition & 1 deletion vignettes/projoint.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Introduction to projoint}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
\usepackage[utf8]{inputenc}
---

The goal of projoint is to ...
Expand Down

0 comments on commit d2aca53

Please sign in to comment.