Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
515 B
1
Indexable
Never
Implementation of two-way ANOVA import statsmodels.api as sm

from statsmodels.formula.api import ols import pandas as pd

Lmport numpy as np

datafrane pd.DataFrame({

"Fertiliser": np.repeat(['daily', 'weekly'], 15), Matering": hp.repeat(['daily " ', 'weekly'], 15),

"height": [14, 16, 15, 15, 16, 13, 12, 11, 14, 15, 16, 16, 17, 18, 14, 13, 14, 14, 14, 15, 16, 15,

model ols('height-C(Fertiliser) C(Watering) C(Fertiliser):C(Matering)", data-datafram).fit() result sw.stats.anova Im(model, typ-2) print(result)
Leave a Comment