Question: (Closed) Using pamr.train to find Shrunken Centroid
0
gravatar for beverly893
5.7 years ago by
beverly89310
United States
beverly89310 wrote:

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.1k views
ADD COMMENTlink modified 5.6 years ago by Biostar ♦♦ 20 • written 5.7 years ago by beverly89310
1
gravatar for beverly893
5.7 years ago by
beverly89310
United States
beverly89310 wrote:

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 COMMENTlink written 5.7 years ago by beverly89310
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1349 users visited in the last hour