Functional Magnetic Resonance (fMRI) data is most often analyzed using linear regression type methods that consider each voxel separately or by using exploratory methods such as Principal Component Analysis (PCA) or Independent Component Analysis (ICA). In this paper we introduce a model, which we call XnPCA, that combines regression with PCA. Unlike the linear regression methods XnPCA allows for non-stationary noise. Additionally, since XnPCA is based on the maximum likelihood framework the Bayesian information criterion (BIC) can be used for model selection and comparison. We compare XnPCA to a regression model commonly used in fMRI research using real data from a combined visual-motor experiment.