Using pamr.train to find Shrunken Centroid
1
0
Entering edit mode
9.3 years ago
beverly893 ▴ 20

I have recently started learning how to use R, and I am trying to create an False Discovery Rate plot for my data. I loaded the "pamr" package, and am using a data set with 11 columns: column 1 is a list of Gene IDs, column 2 is a list of Gene Symbols, and columns 3-11 are the dependency rates of different samples.

I converted my excel file into a text file and ran it in R using this input:

> m.data <- pamr.from.excel("MData.txt", 11, sample.labels=TRUE)

I then ran:

> m.train <- pamr.train(m.data)

I received this error message:

Warning: a class contains only 1 sampleError in quantile.default(sd, offset.percent/100) :
  missing values and NaN's not allowed if 'na.rm' is FALSE
Error during wrapup: cannot open the connection

I am at a complete lost as to what I should do. I've checked to make sure that there are no missing values in my data, but I have no idea what to do next.

EDIT: I should mention that Row 1 contains the class labels (NRas Dependent or NRas Independent), and Row 2 contains the sample labels, of which there are 9.

R • 2.7k views
ADD COMMENT
2
Entering edit mode
9.3 years ago
beverly893 ▴ 20

In case any one else in the future has a similar issue, I've figured out what I did wrong.

The warning says: "a class contains only 1 sample". I realized that my Rows 1 and 2 should be switched; this means that row 1 should contain the sample labels, and row 2 should contain the class labels.

ADD COMMENT

Login before adding your answer.

Traffic: 1777 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6