See in-line below.
cheers,
Rolf Turner
On 04/01/14 12:48, Stefan M?hlbauer wrote:> Hello!
> ?
> I am having two variables x and y (whereas y is a set of raster images) and
want to
> quantify the correlation between x and y by calculating the Pearson
> Correlation Coefficient. In order to ensure how signficant the correlation
> results are, I am interested in getting the p-value (<0.1) for this two
> tailed student-t distribution. The problem now is: I have a very small
> number of observations and therefore would need to make a permutation test,
> which enables to simulate a high number of observations.
You are deluding yourself.> ?
> So far I did? the Pearsons Correlation and Significance test, but without
> applying permutaton test. I used following formula for obtaining the
> p-values:
> ?
> T = r*(sqrt(n-2))/sqrt(1-r??)
> p-value = 2 P [ T(n-2) ??? |t|]
> r...Pearson correlation coefficient
> n...degree of freedom
> ?
> Now I have to redo everything using a permutation test. I thought of
implementing 'lmp' function in 'calc' function of raster
package.
> The two variables I wanted to save within two lists. I am interested in
getting the p-value for each pixel. Can this work?
> ?
> I will very much appreaciate your help!