Hi John,
I might be talking utter nonsense (hopefully there are some
statisticians quietly lurking on the list who will shout out if I
am!), but I think maybe you can get the adjusted values by simply
subtracting off the projection onto the nuisance covariates. E.g.
y = eigenvariate; % or whatever
Z = [ones(size(y,1),1) nuisance];
adj = y - Z*(Z\y);
I think you want the "ones" above to adjust for the mean, though I'm
not entirely sure... this seems to give the right results for the
partial correlation at least... e.g. this seems to give matching results:
load mileage % Matlab example data-set
y1 = mileage(:,1);
y2 = mileage(:,2);
nuisance = mileage(:,3);
partialcorr([y1 y2], nuisance)
Z = [ones(size(y1,1),1) nuisance];
adj1 = y1 - Z*(Z\y1);
adj2 = y2 - Z*(Z\y2);
corr(adj1,adj2)
Sorry I can't offer a more certain answer... hope this still helps,
Ged.
John D. West wrote:
> However, I would also like to be able to graph the results as
> well. This would require the adjusted values I believe.
...
> I can extract the 1st eigenvariate for a cluster by using the VOI
> tool, but this (as far as I can tell) caluculates the 1st
> eigenvariate of the data not adjusted for the 2 covariates.
|