I have a dataframe with three columns: data$input, data$output and data$category. Both input and output are continuous numerics, and categories are discrete characters. I know ANCOVA is a method that analyzes the effect of input on output while controlling for the effect of category. However I could not find the exact command to do for this online.
Here is a small example of how the data would look like:
input output category
1 0.4 0.55 A
2 0.5 0.66 A
3 0.6 0.57 A
4 0.3 0.23 B
5 0.4 0.53 B
6 0.7 0.75 B
7 1.1 1.31 C
8 0.9 1.01 C
9 0.8 0.58 C
10 0.5 0.34 C
What commands should I input to perform the ANCOVA? Thank you very much!