added getPFromMultipleGLM function