calEquation | R Documentation |

calculated slope and intercept from object of class lm

```
calEquation(
fit,
mode = 1,
pred = NULL,
modx = NULL,
modx.values = NULL,
label = NULL,
maxylev = 6,
digits = 2
)
```

`fit` |
An object of class lm |

`mode` |
A numeric |

`pred` |
name of predictor variable |

`modx` |
name of modifier variable |

`modx.values` |
Numeric. Values of modifier variable |

`label` |
A character string |

`maxylev` |
maximum length of unique value of variable to be treated as a categorial variable |

`digits` |
Integer indicating the number of decimal places |

```
fit=lm(mpg~wt*hp+carb,data=mtcars)
calEquation(fit)
calEquation(fit,pred="hp")
```

predict3d documentation built on April 14, 2023, 12:26 a.m.

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.