[R] CHAID in R

2009-08-28 Thread Arup

Hi..I am trying to run CHAID in R..I have installed the sofyware Party and
trying to use the function ctree() to carry out the analysis. but I am
getting the following message Error in terms.default(formula, data = data) :
no terms component
. I am having some Likert scale variable where I have variables like
Overall satisfaction(Dependent Variable),Product quality, Brand
image,Warranty(Independent variable) etc.. Now can anyone tell me how to run
CHAID in this case..what would be the formula? Thanks in Advance..
-- 
View this message in context: 
http://www.nabble.com/CHAID-in-R-tp25188573p25188573.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] Factor Analysis in R

2009-08-08 Thread Arup

Hi I am trying to run Factor Analysis using R...I am using the syntax
factanal(m1, factors=3)  but it's giving me an message Error in cov.wt(z) :
'x' must contain finite values only
 ...I am using a data set which is having only numeric variables and have
some NA's also in it..What should I do next..Someone please help me out with
the syntax..Thanks in advance

Cheers
Arup

-- 
View this message in context: 
http://www.nabble.com/Factor-Analysis-in-R-tp24874411p24874411.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] K-means clustering with NA

2009-08-06 Thread Arup

I am running a k-means clustering code in R : mydata_kmeans5 -
kmeans(mydata, centers=5).. But the problem is that the data is having some
NA in it. So R is showing me a message :Error in switch(nmeth, { :
NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning messages:
1: In switch(nmeth, { : NAs introduced by coercion
2: In switch(nmeth, { : NAs introduced by coercion... my objective is to
find out the customers id who are falling in particular cluster say clst 1,
clst2 etc...If I want to get a data like that where I will have customer id
on one column and cluster number on the other..what code should I use
exactly? Thanks in advance...

Arup
 

-- 
View this message in context: 
http://www.nabble.com/K-means-clustering-with-NA-tp24840626p24840626.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] Discreminant Analysis(How to interpret??)

2009-03-25 Thread Arup

I am trying to carry out discriminant analysis using the syntax:
mydata.lda-lda(Y~X+Z,data=mydata) and result that I am getting is 
Call:
lda(Y ~ X + Z, data = mydata)

Prior probabilities of groups:
0 1 
0.3636364 0.6363636 

Group means:
  XZ
0 17726.750  4020.00
1  2307.286 10100.86

Coefficients of linear discriminants:
LD1
X -9.478517e-05
Z  2.817044e-06


Now my problem is how to interpret the result. Please help me out with the
interpretation of the above discriminant analysis result. Thanks in advance
-- 
View this message in context: 
http://www.nabble.com/Discreminant-Analysis%28How-to-interpret--%29-tp22698146p22698146.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] Random sampling based on the observations

2009-03-24 Thread Arup

Hello!I am having a problem with Random sampling in R. I have used a syntax:
mydata.sub=sample(mydata,7,replace=FALSE,prob=NULL) which allows me to
choose a random sample based on the variables(correct me if I am wrong!).
Suppose I have 10 variable and if I use the above mentioned command then it
will choose 7 variables out of the 10 randomly. My problem is that I want to
have a random sample which is not based on the variables but on the values
of the variables that is the random sample will be based on the
observations. It will be great if someone can help me out me out with a
proper syntax. Thanks in Advance.
-- 
View this message in context: 
http://www.nabble.com/Random-sampling-based-on-the-observations-tp22673975p22673975.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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.


Re: [R] Random sampling based on the observations

2009-03-24 Thread Arup

Thank you Adrian. Its working.Thank you so much. Take care =^D=)

Cheers

Arup Pramanik
Business Analyst
Redwood Associates
Bangalore,India.



Adrian Dusa wrote:
 
 On Tuesday 24 March 2009, you wrote:
 Hello!I am having a problem with Random sampling in R. I have used a
 syntax: mydata.sub=sample(mydata,7,replace=FALSE,prob=NULL) which allows
 me
 to choose a random sample based on the variables(correct me if I am
 wrong!).
 
 Actually, no.
 You are sampling from a vector, and where you're using the sampled values
 (on 
 the rows or on the variables) is up to you.
 
 Let's say we have a dataset with 100 cases and 10 variables:
 
 Case 1:
 mydata.sub - mydata[ , sample(10, 7)]
 
 This will sample 7 variables out of 10.
 
 Case 2:
 mydata.sub - mydata[sample(100, 10), ]
 
 This will sample 10 cases out of 100.
 
 Suppose I have 10 variable and if I use the above mentioned
 command then it will choose 7 variables out of the 10 randomly. My
 problem
 is that I want to have a random sample which is not based on the
 variables
 but on the values of the variables that is the random sample will be
 based
 on the observations. It will be great if someone can help me out me out
 with
 a proper syntax. Thanks in Advance.
 
 I think you need to read the help for:
 ?[
 
 and most probably one of the introductory books for R.
 I hope this helps,
 Adrian
 
 
 -- 
 Adrian Dusa
 Romanian Social Data Archive
 1, Schitu Magureanu Bd.
 050025 Bucharest sector 5
 Romania
 Tel.:+40 21 3126618 \
  +40 21 3120210 / int.101
 Fax: +40 21 3158391
 
 
   [[alternative HTML version deleted]]
 
 __
 R-help@r-project.org 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.
 
 

-- 
View this message in context: 
http://www.nabble.com/Random-sampling-based-on-the-observations-tp22673975p22681075.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] Data Envelopment Analysis in R

2009-02-25 Thread Arup

How do I do a data envelopment analysis in R...provide me with the step by
step procedure for that..thanks in advance...

Arup
-- 
View this message in context: 
http://www.nabble.com/Data-Envelopment-Analysis-in-R-tp22199360p22199360.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] Linear Discriminant Analysis

2009-02-25 Thread Arup

Kindly let me know the process to carry out a Linear discriminant
analysis...thanks in advance

Arup
-- 
View this message in context: 
http://www.nabble.com/Linear-Discriminant-Analysis-tp22199424p22199424.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] Transformation of Variables

2009-02-15 Thread Arup

I have a data frame in R  where all the variables are character in nature.
kindly let know how I can transform these character variable into say
numeric,Categorical,continuous etc.Please provide me with the proper
syntax. Thank you in advance.  
-- 
View this message in context: 
http://www.nabble.com/Transformation-of-Variables-tp22032424p22032424.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] How to convert Charagter variables into numeric

2009-02-05 Thread Arup

I am importing a dataset in R where some of the variable are numerical and
some of them are character...but the problem is that R is treating 
numerical variables as character (I am using is.character to judge the
type). Now the question is how can I convert these character variables into
numeric and also let me know about the other conversion like numeric to
categorical,numeric to continuous etc.Thank you.

Arup  
-- 
View this message in context: 
http://www.nabble.com/How-to-convert-Charagter-variables-into-numeric-tp21867485p21867485.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] How to import HTML and SQL files

2009-02-04 Thread Arup

I can't import any HTML or SQL files into R..:confused: Please suggest me the
packages for these two file types and also let me know the syntax for
importing these two type of files. Thank you in advance.

Arup
-- 
View this message in context: 
http://www.nabble.com/How-to-import-HTML-and-SQL-files-tp21830945p21830945.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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.


Re: [R] How to import HTML and SQL files

2009-02-04 Thread Arup

Thanks a lot..I am trying to pick up R on my own.I will be asking you
questions if I am having any problem at any point of time.Thank you.

Arup

Dieter Menne wrote:
 
 Arup arup.pramanik27 at gmail.com writes:
 
 I can't import any HTML or SQL files into R..:confused: 
 
 Also confused. HTML and SQL are like apples and bugs.
 
 For HTML (assume you want to extract stock quotes from a site)
 
 -- If you have strict XHTML, using package XML might be
the best choice, but I doubt you get these nowadays.
 -- Otherwise, read in the file and use regular expressions (grep, 
gsub) to parse.
 
 For SQL: SELECT * from mybase
 
 -- Importing that string does not help very much, this is 
a program telling you what to do when you know your database.
 -- You might have a look at package RODBC or RSQLite; details depend on 
the database you are going to use.
 
 Dieter
 
 __
 R-help@r-project.org 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.
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-import-HTML-and-SQL-files-tp21830945p21846010.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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] problem of importing files into R

2009-02-02 Thread Arup

I am using R 2.8.1...Sometimes it is happening that I am trying to import
some  text files into R but it is not working...But sometime it is
working..I am using the syntax: mydata = read.table( file.choose(), skip = 1
)..someone please help me..you can also suggest a better syntax for
importing data from other sources..Thank you.

Arup
-- 
View this message in context: 
http://www.nabble.com/problem-of--importing-files-into-R-tp21784574p21784574.html
Sent from the R help mailing list archive at Nabble.com.

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.