<s> """<STR_LIT>""" <EOL> from statsmodels . sandbox . tests . test_gam import _estGAMGaussianLogLink <EOL> tt = _estGAMGaussianLogLink ( ) <EOL> comp , const = tt . res_gam . smoothed_demeaned ( tt . mod_gam . exog ) <EOL> comp_glm_ = tt . res2 . model . exog * tt . res2 . params <EOL> comp1 = comp_glm_ [ : , <NUM_LIT:1> : <NUM_LIT:4> ] . sum ( <NUM_LIT:1> ) <EOL> mean1 = comp1 . mean ( ) <EOL> comp1 -= mean1 <EOL> comp2 = comp_glm_ [ : , <NUM_LIT:4> : ] . sum ( <NUM_LIT:1> ) <EOL> mean2 = comp2 . mean ( ) <EOL> comp2 -= mean2 <EOL> comp1_true = tt . res2 . model . exog [ : , <NUM_LIT:1> : <NUM_LIT:4> ] . sum ( <NUM_LIT:1> ) <EOL> mean1 = comp1_true . mean ( ) <EOL> comp1_true -= mean1 <EOL> comp2_true = tt . res2 . model . exog [ : , <NUM_LIT:4> : ] . sum ( <NUM_LIT:1> ) <EOL> mean2 = comp2_true . mean ( ) <EOL> comp2_true -= mean2 <EOL> noise = tt . res2 . model . endog - tt . mu_true <EOL> noise_eta = tt . family . link ( tt . res2 . model . endog ) - tt . y_true <EOL> import matplotlib . pyplot as plt <EOL> plt . figure ( ) <EOL> plt . plot ( noise , '<STR_LIT>' ) <EOL> plt . figure ( ) <EOL> plt . plot ( comp , '<STR_LIT>' ) <EOL> plt . plot ( comp1 , '<STR_LIT>' ) <EOL> plt . plot ( comp2 , '<STR_LIT>' ) <EOL> plt . plot ( comp1_true , '<STR_LIT>' , lw = <NUM_LIT:2> ) <EOL> plt . plot ( comp2_true , '<STR_LIT>' , lw = <NUM_LIT:2> ) <EOL> plt . plot ( comp1_true + noise_eta , '<STR_LIT>' , alpha = <NUM_LIT> ) <EOL> plt . plot ( comp2_true + noise_eta , '<STR_LIT>' , alpha = <NUM_LIT> ) <EOL> plt . title ( '<STR_LIT>' ) <EOL> plt . show ( ) </s>
