adjust.proportions | R Documentation |

A wrapper for modifyProps. Subsets by the logiset call the appropriate version of modifyProps (modifyPropsContinuous or modifyProps) then, if modifyProps was called on a logiset, combine and reorder the data using combine.and.reorder(). Called in adjustCatVar(), adjustContVar, and applyContAdjustmentToSimframe().

```
adjust.proportions(
x,
desiredProps,
propens = NULL,
logiset = NULL,
catToContModels = NULL,
cont.binbreaks = NULL,
envir = parent.frame()
)
```

`x` |
A categorical vector to be adjusted. |

`desiredProps` |
Vector of desired proportions |

`propens` |
propensity scores used to decide who should change categories |

`logiset` |
A TRUE/FALSE vector indicating the subset of units to apply the scenari (change in proportions) to |

`catToContModels` |
A list of models which will to used to convert the adjusted categorical variable back to continuous. |

`cont.binbreaks` |
Binbreaks for the variable being adjusted if exist. Used to ensure the imputed continuous values (only for continuous variables) are within the bounds of the category. |

`envir` |
environment - for the MELC MSM is usually the simframe of the scenario environment. |

an adjusted vector, either categorical or continuous depending on whether catToCont models were provided.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.