Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

statsmodel_training.py 418 B

1234567891011121314151617181920
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Tue Apr 9 11:11:14 2024
  4. @author: arefks
  5. """
  6. import numpy as np
  7. import pandas as pd
  8. import statsmodels.api as sm
  9. import statsmodels.formula.api as smf
  10. # grab the data/load data
  11. data = sm.datasets.get_rdataset("dietox", "geepack").data
  12. data.head()
  13. model = smf.mixedlm("Weight ~ Time",data,groups=data["Pig"])
  14. res = model.fit(method=["lbfgs"])
  15. res.summary()