[R] Mclust help

2007-05-13 Thread A Das
Hi, quick question from a social scientist new to R:
how do I add labels/row names to the nodes in
coordProj / plot.Mclust plots? Apologies if this is a
silly question... Thanks. 
 -- Bobby


   
Sick
 sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] anova for random-intercept lmer

2005-09-19 Thread A Das
Hi,
This might be a silly question, but how do I
create  a pooled model (binomial family) as a baseline
for a likelihood-ratio test for a random-intercept
lmer model? R won't compare a glm model with an lmer
model (or  glmmPQL ). Thanks in advance.
-Bobby

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] random effects plot

2005-09-10 Thread A Das
Hi, does anyone know how to do random effects plots
for multi-level models? 
plot(ranef(model)) doesn't seem to work in the
latest release. Here's the error message:
Error in table(x) : argument x is missing, with no
default
In addition: Warning message:
The 'formula' argument has been renamed to 'x'. See
?xyplot in: dotplot(formula = .groups ~ .pars |
.enames, data = list(.pars = c(-0.0388163041843026,  

Help a poor sociologist out... 
  -Bobby

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] survey weights

2005-09-04 Thread A Das
Thanks, Thomas.
Yes, that's exactly what happened: the warnings
came first after data(China), and then after
dchina-svydesign... So the design object isn't
being produced? The dataset is very large, and the
weights were already set in Stata before importing.
Would either of those cause problems?
   -Bobby
  
 

--- Thomas Lumley [EMAIL PROTECTED] wrote:

 On Sat, 3 Sep 2005, A Das wrote:
 
  Hi all, I've been trying to get a large (12mb)
 Stata
  survey database into R. I managed that, but when I
  attach survey weights, something goes wrong. The
 error
  message is: object dchina not found. Here's the
  script:
 
 If that is the *first* message then something
 extremly strange is 
 happening
 
  library(car)
  library(foreign)
  library(survey)
 
  China - read.dta(C:/final07c2.dta)
  attach(China)
 
 This attach() isn't necessary or helpful
 
  data(China)
 You should get a warning here
 
 Warning message:
 data set 'China' not found in: data(China)
 
 since China isn't one of the built-in data sets. If
 you don't get this 
 message it suggests that you do have a built-in
 dataset called China, 
 which will have overwritten your file.
 
 

dchina-svydesign(id=~psu,strata=~strata,weights=~weight0x,
   data=China,nest=TRUE)
 
 If this line doesn't produce an error message then a
 variable called 
 dchina must have been produced, in which case you
 shouldn't get an error 
 message saying it wasn't found in the next line.
 
  summary(dchina)
 
 
 
 Are you sure there wasn't an earlier error message
 from the call to 
 svydesign()?
 
   -thomas


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] survey weights

2005-09-04 Thread A Das
Just: missing values in object. That would imply the
object was created. But then I write dchina, and it
says object dchina not found. 
  -Bobby

--- Thomas Lumley [EMAIL PROTECTED] wrote:

 On Sun, 4 Sep 2005, A Das wrote:
 
  Thanks, Thomas.
 Yes, that's exactly what happened: the warnings
  came first after data(China), and then after
  dchina-svydesign... So the design object isn't
  being produced? The dataset is very large, and the
  weights were already set in Stata before
 importing.
  Would either of those cause problems?
 
 Probably not.  What was the error message from
 svydesign()?  That is what 
 will say what went wrong.
 
   -thomas


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] survey weights

2005-09-04 Thread A Das
That worked. Many thanks, Thomas. 
  -Bobby

--- Thomas Lumley [EMAIL PROTECTED] wrote:

 On Sun, 4 Sep 2005, A Das wrote:
 
  Just: missing values in object. That would imply
 the
  object was created. But then I write dchina, and
 it
  says object dchina not found.
 
 No, it would not imply the object was created.  If
 it was an error message 
 (rather than a warning) the object would not have
 been created.
 
 I presume the full message was
   Error in na.fail.default(object) : missing values
 in object
 
 If so, it sounds as though you have missing values
 in the id, weights, or 
 strata variable.
 summary(China[,c(psu,stata,weight0x])
 will verify this.
 
 Stata will just have dropped these observations (use
 -svydes- to verify 
 this).  If you want to drop the observations in R
 you need to do this 
 explicitly. Having missing data may be unavoidable,
 but if you have 
 observations in a sample it seems that you should
 know how they were 
 sampled.
 To drop these observations you could use
 
 obsChina - subset(China, !is.na(psu) 
 !is.na(strata)  !is.na(weight0x))
 
 and then use obsChina rather than China in the
 svydesign() function.
 
   -thomas
 
 
 
   -Bobby
 
  --- Thomas Lumley [EMAIL PROTECTED]
 wrote:
 
  On Sun, 4 Sep 2005, A Das wrote:
 
  Thanks, Thomas.
 Yes, that's exactly what happened: the
 warnings
  came first after data(China), and then after
  dchina-svydesign... So the design object
 isn't
  being produced? The dataset is very large, and
 the
  weights were already set in Stata before
  importing.
  Would either of those cause problems?
 
  Probably not.  What was the error message from
  svydesign()?  That is what
  will say what went wrong.
 
 -thomas
 
 
 
 
 
 
 
  Start your day with Yahoo! - make it your home
 page
  http://www.yahoo.com/r/hs
 
 
 
 Thomas Lumley Assoc. Professor, Biostatistics
 [EMAIL PROTECTED] University of Washington,
 Seattle


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] survey weights

2005-09-03 Thread A Das
Hi all, I've been trying to get a large (12mb) Stata
survey database into R. I managed that, but when I
attach survey weights, something goes wrong. The error
message is: object dchina not found. Here's the
script:

library(car)
library(foreign)
library(survey)

China - read.dta(C:/final07c2.dta)
attach(China)

data(China)
dchina-svydesign(id=~psu,strata=~strata,weights=~weight0x,data=China,nest=TRUE)
summary(dchina)

Any thoughts?
   -Bobby

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] decision values and probability in SVM

2005-03-16 Thread Das, Rajdeep
Hi,
 
I am using SVM from e1071 package.  I can get decision values very easily. But 
whenever, I try to get the probability measure, it returns NULL. I use the 
following codes to generate decision.values and probability. Is there anything 
wrong in it?
 
 
predictor-svm(train[,c(x1, x2, x3)], train[,x4], probability=TRUE)
 
pred-predict(predictor, test[,c(x1, x2, x3)], probability=TRUE, 
decision.values=TRUE)
 
attr(pred, decision.values)[1,]
 
attr(pred, probabilities)[1,]
 
 
Thanks for your help.
 
Raj

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] feature (attribute) selection

2005-02-02 Thread Das, Rajdeep
Hi,

Look for dprep package for wrapper based feature selction that use  lda,
knn etc.

Also you can use package rfe that implements recursive feature elimination
using SVM.


-Original Message-
From: WeiWei Shi
To: R-help@stat.math.ethz.ch
Sent: 2/2/05 5:43 PM
Subject: [R] feature (attribute) selection

Hi, there:
Recently, I read some papers about feature or attribute selection and
most of them are discussed in the context of supervised learning.

I knew Weka has implementation on some of them but I am wondering if
there is any package available in R which can do this kind of job.

Thanks for advice,

Ed

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] probabilty calculation in SVM

2005-01-14 Thread Das, Rajdeep
Hi All,

In package e1071 for SVM based classification, one can get a probability
measure for each prediction. I like to know what is method that is used for
calculating this probability. Is it calculated using logistic link function?
Thanks for your help.

Regards,

Raj

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] using created R objects in a program

2005-01-13 Thread Das, Rajdeep
Hi,

I am running a program in --vanilla mode. I would like to know how to load
saved functions in the program that it calls. EVerytime I call those objects
it returns error and complains that it cannot find the function object I am
calling. Please let me know. Thanks in advance.

Regards,

Raj

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] predict.glm

2004-12-29 Thread Rajdeep Das
Hi All,

Sorry for this is a very naive question. 

I am trying to do binary classification (male vs female)  using glm using 
following data:

X1X2X3Class
2.34.52.1Male
0.93.2   1.6 Male
1.71.82.6Feamle



I am trying to use predict.glm for prediction with type=respose which gives 
the predicted probabilities as per documentation. 

My question is: which of the two classes does this probability corresponds to? 
My understanding is that it is the probability of the class that each of the 
new data has. Is that correct?

Thanks.

Raj
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] glm vs multinom

2004-12-28 Thread Rajdeep Das
Dear Colleagues,

I am doing two class classification using logistic regression. I realized that 
I can either use glm function or multinom function. I know multinom is 
used for multiclass classification. But if I was it for binary classification, 
I was wondering if there is an difference in the results compared to glm 
results.

Thanks in advance.

Regards,

Raj

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] classification using logistic regression

2004-12-27 Thread Rajdeep Das
Dear Colleagues,

I would like to do classification using logistic regression. Which R package 
can I use? 

Also is there any package for feature selection for logistic regression based 
method?

Thanks a lot in advance.

Happy holidays.

Regards,

Raj
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] random numbers within a given range

2004-12-27 Thread Rajdeep Das
Dear Colleagues,

Is there a way to get random numbers within a given range?

Regards and thanks in advance,

Raj
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] feature selection for SVM

2004-12-20 Thread Rajdeep Das
Dear Colleagues,

Is there any package in R/S-plus which does feature selection for SVM? I am 
working with 8 features. Since SVM is regularization based method, I am not 
sure if I need to do feature selection for it. In anycase, I would really like 
to know if there is any package for feature selection in SVM. Thanks.

Raj
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] reading svm function in e1071

2004-12-16 Thread Rajdeep Das
Hi,

If I try to read the codes of functions in e1071 package, it gives me following 
error message.

library(e1071)

 svm
function (x, ...)
UseMethod(svm)
environment: namespace:e1071

 predict.svm
Error: Object predict.svm not found


Can someone help me on this how to read the codes of the functions in the e1071 
package?

Thanks.


Raj
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] SVM: quality of prediction

2004-12-09 Thread Rajdeep Das
Hi,
I am using SVM for two class classification purpose using RBF kernel. Once SVM 
builds a optimal model, it to used to predict classes for  the new data. I was 
wondering if there is any metric or score that can be calculated from SVM which 
measures the quality of prediction for each new data point. So what I want to 
know is the can among different predictions, is there anyway to know which one 
is more accurate (according to classifier model) and which one is less 
accurate. Thanks.

Raj
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] SVM distance

2004-12-01 Thread Rajdeep Das
Hi,
I am using SVM from e1071 package. I am using RBF kernel. I would like to 
know how I can get d, the perpendicular distance from a datapoint to the 
hyperplane, that SVM calculates in higher dimensional space to classify it. 
Although, this is not something that people usually use, but for my case I 
like to do something with that distance. Does anybody have any idea how to 
get  it?
Thanks.
Raj

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Feature selection

2004-11-02 Thread Rajdeep Das
Hi Edgar,
Thanks. dprep module works fine. However, I have one question. How does 
SFFS or SFS function know the class definition in the data?  Function call 
doesn't require to specify the column that identifies the class type (as 
shown inthe example). Can you eleborate on  this?
Thanks.
Rajdeep
- Original Message - 
From: Edgar Acuna [EMAIL PROTECTED]
To: Rajdeep Das [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, October 25, 2004 7:11 PM
Subject: Re: [R] Feature selection


Raj,
look at academic.uprm.edu/eacuna/softw.htm, I built a library of R
functions for data preprocessing tasks including feature selection
for supervised classification.
Please send me your comments.
Edgar
On Mon, 25 Oct 2004, Rajdeep Das wrote:
Hello,
I want to do feature selection for classification purpose (using lda). 
Can someone point me to any R package or S-plus package for this? 
Something like SFS or SFFS method would be useful for me.
Thanks.
Raj
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html


__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] test

2004-10-29 Thread Rajdeep Das

[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] test

2004-10-27 Thread Rajdeep Das

[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Feature selection

2004-10-25 Thread Rajdeep Das
Hello,
I want to do feature selection for classification purpose (using lda). Can someone 
point me to any R package or S-plus package for this? Something like SFS or SFFS 
method would be useful for me.
Thanks.
Raj
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html