I would like to see whether pathogen levels influenced certain bumblebee colony development parameters such as the number of queen pupae produced.

Due to non-normality of the data I would like to do a rankit transformation of the data as suggested by [Bishara & Hittner (2012)][1].

Quote:

To define this transformation, let x_r be the ascending rank of x, such that xr = 1 for the lowest value of x. The RIN transformation function used here is

f(x)= Φ^(-1) ((x_r-0.5)/n)

where Φ^(-1)is the inverse normal cumulative distribution function and n is the sample size (Bliss, 1967).

I could not figure out how to do the rankit transformation in R. I tried this:

Code:

` my.df$queen.pupae_rankit = qnorm((rank(my.df$queen.pupae)-0.5)/length(my.df$queen.pupae))`

Code:

` qqnorm(my.df$queen.pupae_rankit)`

Therefore, I would like to know

- How can I get rankit scores from data with ties?
- Is the qnorm function actually the correct function to get the inverse cumulative distribution function
- [Bishara & Hittner (2012)][1] used the rankit scores in Pearson correlations rather than regressions. I know in a regression only the independent variable has to be normally distributed. Should I anyway, as [Bishara & Hittner (2012)] did transform also the dependent variable?

I began using R last week and... It drives me crazy!

However, I'm using the package "AnalyzefMRI" and that's right, but I have some problems related to atomic vector.

Here's my code:

>library(AnalyzeFMRI)

> fM0223_004 <- "C:/Users/IVACCHIERI/Downloads/fM00223.fM0223_004.img"

> img <- f.read.analyze.volume(fM0223_004)

Error in hdr$dim : $ operator is invalid for atomic vectors

It's ok, until the last command.

Any help? What's the problem on the header file?:confused:

I understood the story about atomic, recursive, matrix and vectors, but I can't see how it's linked to my case... Thanks!:wave: ]]>