plotModelExp {conquestr} | R Documentation |

## plotExpected

### Description

Creates a plot of an item- or test- expected score curve.
If ability estimates are provided, both empirical and model curves are produced.
Can optionally handle weights and groups as required.
Note this is not for use with `rout`

files. See the generic function `plotRout`

for plotting rout files.

### Usage

```
plotModelExp(
items,
range = c(-6, 6),
by = 0.1,
bins = NULL,
abilities = NULL,
weights = NULL,
group = NULL,
scale = FALSE
)
```

### Arguments

`items` |
a |

`range` |
Lower and upper bounds to plot over (defaults to c(-6, 6). Used in producing model-implied curves. For empirical curves a range is chosen given the min and max values in abilities. |

`by` |
Increment to calculate expectation along |

`bins` |
A double. Optional. How many equally sized bins should abilities be broken up into? Used in producing empirical curves. If not provided and abilities are provided, a suitable value is chosen given the length of abilities. |

`abilities` |
A vector of doubles. Optional. |

`weights` |
A vector of doubles. Optional. |

`group` |
A vector of type factor. Optional. |

`scale` |
A Boolean. Whether plot should be scaled such that the Y-axis ranges from 0 to 1. |

### Value

A ggplot2 object.

### Examples

```
myItem <- matrix(
c(
0, 0, 0, 1,
1, 1, 0, 1
),
ncol = 4, byrow=TRUE
)
myPlot <- plotModelExp(list(myItem))
```

*conquestr*version 1.3.4 Index]