Multiple linear regression only returning coefficient for first independent variable #398
-
hi there, I'm switching to pingouin from sklearn and I'm currently attempting to perform a multiple linear regression at each gridpoint using modeled weather data stored in netcdf files. in order to do this, I have a triple for loop structured like so:
when I execute this code, the linear_regression command only returns regression coefficients for the intercept & EIS. is there a problem with how I've constructed the dataframe? (for reference, the data are shaped like so: latitude x longitude x time x level. the latitude grid is np.linspace(-90,90,144), the longitude np.linspace(-180,180,192), time pd.daterange('20000101','20141231',freq='MS'), and level is a custom logarithmically decreasing range between 1000 hPa (surface) and 1 hPa (top of atmosphere) with 19 entries. EIS, SST, and LCF do not have level data; all 5 columns in the pd df are (should be!) a timeseries at a single point in 3d space). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
think I figured it out: columns with nan/infinitesimal values are problematic and I think there was an issue stemming from that wrt rank. changed preprocessing of nan from mean to 0 and that fixed it. |
Beta Was this translation helpful? Give feedback.
think I figured it out: columns with nan/infinitesimal values are problematic and I think there was an issue stemming from that wrt rank. changed preprocessing of nan from mean to 0 and that fixed it.