stata adjust
时间: 2023-11-23 11:07:01 浏览: 36
Stata's `adjust` command is used to adjust the scale of a variable by dividing it by a specified constant. This is often used to convert a variable from one unit of measurement to another, for example, converting a variable measured in pounds to kilograms.
The basic syntax for using `adjust` is:
```
adjust variable, divide(constant)
```
where `variable` is the name of the variable you want to adjust, and `constant` is the value you want to divide it by.
For example, let's say you have a variable called `weight_lb` that measures weight in pounds, and you want to convert it to kilograms. Since 1 pound is equal to 0.453592 kilograms, you can use the following command:
```
adjust weight_lb, divide(0.453592)
```
This will create a new variable called `weight_lb_adj` that is the original `weight_lb` variable divided by 0.453592, effectively converting it to kilograms.
Note that `adjust` does not modify the original variable, but rather creates a new adjusted variable. If you want to replace the original variable with the adjusted variable, you can use the `replace` command:
```
replace weight_lb = weight_lb_adj
```