[R] ski.mack test in R

Sarah Goslee
Tue, 20 Aug 2019 17:18:21 -0000

Hi Sophie,

We don't have enough information to help you.

You DON'T need to type in the data for your test - that's how the
package authors are creating a reproducible example for you.

But you do need to have your data in the correct format, and we have
no idea what your a looks like.


a <- read.table(file.choose(), header=T) # good
# attach(a) # don't do this
a<-as.matrix(a)

library(Skillings.Mack) # you forgot to tell us where you got the
function you're using

a needs to be "Either a numeric vector of data values, or a data
matrix. If a matrix is used, columns and rows are correspondent to
blocks and treatments (groups), respectively."

Since your a is a matrix, then it should be the latter. Is that what you have?

You say that

Ski.Mack(a)

"doesn't work." That isn't enough for us to help. What error
message
do you get? We need specifics about what "doesn't work" means.

We also need a reproducible example, possibly with toy data like the
package authors used
[.https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example]
The output of

str(a)

would also be very helpful.

Sarah

On Tue, Aug 20, 2019 at 12:02 PM Sophie Bleke <sophie.bleke01 at
gmail.com> wrote:
>
> Dear R-Help List,
>
> For part of my data, which I analyse with Friedman.test, there is data
> missing, which is a normal result of the experimental setup. If I am
> correct, I need to use the Ski.Mack test in R for it.
>
> Normally, I read my data in for Friedman or post hoc Wilcoxon like below:
>
> a <- read.table(file.choose(), header=T)
>
> attach(a)
> a<-as.matrix(a)
>
> friedman.test(a)
>
> I tried to replace the friedman line with your ski.mack command, but it is
> not getting me where I need to get.
>
> Ski.Mack(a, simulate.p.value = TRUE, B = 1000)
>
> or
>
> Ski.Mack(a)
>
> Both don't work.
>
> Is there as simple command way, as above, to read out the ski.mack test
> from my txt file, without manually typing all the data points as rows and
> colums in the R console, which is recommended in the ski.mack author's
> online PDF? It's a lot of data and manually inputting rows and colums
and
> data points won't be doable in this case.
>
> I would be very grateful to hear of an elegant short solution, similar to
> the friedman command / read-in lines above.
>
> Sophie
>


--
Sarah Goslee (she/her)