[R] New contribute about R & Regression

2006-09-19 Thread Vito Ricci
Dear UseRs, you can find on CRAN web site my last contribute about R & regression techniques: http://cran.r-project.org/doc/contrib/Ricci-regression-it.pdf It's in Italian language. Regards. Vito Ricci Se non ora, quando? Se non qui, dove? Se no

[R] Error in memory allocation

2006-08-31 Thread Vito Ricci
ULIP" machine login "x86" "Utente-01" user "Utente-01" Can anyone help me? I need to read those data! Thanks in advance. Regards. Vito Ricci Se non ora, quando? Se non qui, dove? Se non tu, chi? _

[R] R & Visual Basic

2006-07-18 Thread Vito Ricci
Der R-UserRs, I need a little help, I wish to know if exists a way to use R in Visual Basic environment, in creation of VB applications, embedding R in VB. Is it possible? Can anyone help me? Is there something such as books, articles, other available on the web? Thanks in advance. Regards. Vito

Re: [R] Chi-squared test

2005-11-24 Thread Vito Ricci
Hi Bianca, you could see my contribute "Fitting distribution with R", pagg. 16-18: http://cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf Hoping it could help you. Regards, Vito From: Bianca Vieru- Dimulescu free.fr> Subject: [R] Chi-squared test Date: 2005-11-24 11:13:24 GMT (2

Re: [R] Goodness fit test HELP!

2005-11-17 Thread Vito Ricci
Hi David, you could see my contribute: "Fitting distributions with R" http://cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf Hoping it could be helpful. Regards, Vito You wrote: Hi there, I'm a newbie, plesae bear with me. I have a dataset with about 1 ~ 3 data points.

Re: [R] Fitdistr()

2005-11-17 Thread Vito Ricci
Hi, values in parentesis below the estimate of a parameter is the standard deviation of parameter, that's a measure of variability. Regards. Vito > set.seed(123) > x <- rgamma(100, shape = 5, rate = 0.1) > fitdistr(x, "gamma") shape rate 6.45947303 0.13593172 (0

Re: [R] ECDF values

2005-11-17 Thread Vito Ricci
Sorry, I solved by myself. Thanks. Vito From: Vito Ricci yahoo.com> Subject: [R] ECDF values Date: 2005-11-17 07:20:35 GMT (33 minutes ago) Dear UseRs, maybe is a silly question: how can I get Empirical CDF values from an object created with ecdf()?? Using print I obtain: Empirical CDF C

[R] ECDF values

2005-11-16 Thread Vito Ricci
Dear UseRs, maybe is a silly question: how can I get Empirical CDF values from an object created with ecdf()?? Using print I obtain: Empirical CDF Call: ecdf(t) x[1:57] =4.1,4.4,4.5, ..., 491.3, 671.27 Thanks in advance. Regards, Vito Diventare costruttori di soluzioni Became

Re: [R] Box.test

2005-10-27 Thread Vito Ricci
Hi, Give a look to the help page: ? Box.test Compute the Box-Pierce or Ljung-Box test statistic for examining the null hypothesis of independence in a given time series. See also: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/27265.html Regards. Vito You wrote: Does p-value on Box.test(d

Re: [R] Help needed with ks.test

2005-10-20 Thread Vito Ricci
Ciao Emanuele, you could give a look to this contribute on fitting distributions with R, maybe it could be helpful to you: http://cran.r-project.org/doc/contrib/Ricci-distributions-it.pdf Regards, Vito Emanuele Mazzola wrote Hello to everybody, I'd like to submit a problem I'm dealing with

Re: [R] ast package?

2005-10-02 Thread Vito Ricci
Hi, several people asked me where they can found ast. Prof. Masarotto should put it on CRAN as soon as possible. ast package has many functions useful in time series analysis. Regards, Vito --- Peter Dalgaard <[EMAIL PROTECTED]> ha scritto: > "Rabaa, Maia" <[EMAIL PROTECTED]> writes: > > > A

Re: [R] create trend variable in a regression using R

2005-09-27 Thread Vito Ricci
Dear Giacomo, what you mean precisely saying "to create a Trend variable in a regression"? If it concerns about time series analysis you could give a look to my contribute: http://cran.r-project.org/doc/contrib/Ricci-ts-italian.pdf Best Regards Vito Hi, my name is Giacomo. I would like to k

Re: [R] regression data set

2005-08-03 Thread Vito Ricci
Hi, I suggest to give a look to: “Practical Regression and Anova using R” by Julian Faraway http://cran.r-project.org/doc/contrib/Faraway-PRA.pdf http://www.stat.lsa.umich.edu/~faraway/book/ see also package faraway for datasets: http://cbio.uct.ac.za/CRAN/src/contrib/Descriptions/faraway.html

Re: [R] R: non parametric regression/kernels

2005-07-29 Thread Vito Ricci
Hi Clark, see: ? loess http://finzi.psych.upenn.edu/R/library/stats/html/loess.html ? scatter.smooth http://finzi.psych.upenn.edu/R/library/stats/html/scatter.smooth.html Regards, Vito Clark Allan STATS.uct.ac.za> wrote: hi all i have a another stats question. i would like to solve the

Re: [R] stl()

2005-07-28 Thread Vito Ricci
Hi, maybe residuals are autocorreleted, you could you use ARIMA models. See arima() in R to fit an ARIMA model. Regards, Vito Sebastian.Leuzinger unibas.ch> wrote: Hello, anyone got an idea on how to use stl() so that the remainder eventually becomes white noise? i used stl repeatedly but ther

Re: [R] Cochran-Armitage-trend-test

2005-07-28 Thread Vito Ricci
Hi, see: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/20396.html Regards, Vito [EMAIL PROTECTED] wrote: Hi! I am searching for the Cochran-Armitage-trend-test. Is it included in an R-package? Thank you! Diventare costruttori di soluzioni Became solutions' constructors "The business o

Re: [R] fitting extreme value distribution

2005-07-27 Thread Vito Ricci
Hi, for fitting have you seen ?fgev in evd package, or ?gevFit in fExtremes or ?gev in evir package? Regards, Vito slu.edu> wrote: hi, rgev function gives me random deviates and I have a data set which I am fitting to an EVD,IS there a way I can plot both observed and ideal evd on the same

Re: [R] poisson fit for histogram

2005-07-20 Thread Vito Ricci
Hi, see: http://cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf Regards, Vito Thomas Isenbarger isen at plantpath.wisc.edu wrote: I haven't been an R lister for a bit, but I hope to enlist someone's help here. I think this is a simple question, so I hope the answer is not muc

Re: [R] data mining

2005-07-20 Thread Vito Ricci
Hi Adrian, give a look to these links concerning R & DM: http://www.togaware.com/datamining/survivor/R.html http://sawww.epfl.ch/SIC/SA/publications/FI01/fi-sp-1/sp-1-page45.html http://www.stats.ox.ac.uk/~vos/DataMining.html Hoping I helped you. Regards, Vito secretario academico FACEA face

[R] Orthogonal regression

2005-07-08 Thread Vito Ricci
Dear R-Users, is there any statement to fit a orthogonal regression in R environment? Many thanks in advance. Best regards, Vito Diventare costruttori di soluzioni Became solutions' constructors "The business of the statistician is to catalyze the scientific learning process." George E. P

[R] Re: Does R has the function for garch-t, gjr-garch, qgarch and egarch

2005-02-23 Thread Vito Ricci
Hi, see: - HestonNandiGarchFit(fOptions) Heston-Nandi Garch(1,1) Modelling - HestonNandiOptions(fOptions) Option Price for the Heston-Nandi Garch Option Model - GarchModelling(fSeries) Univariate GARCH Time Series Modelling - GarchDistributionFits(fS

[R] Re: nonlinear least square fit of an unknown function

2005-02-23 Thread Vito Ricci
Hi Eric, if I understand you question, are you trying to fit an unknown distribution? Are looking for computing theorical frequencies (area under the curve)? In this case you could see: http://cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf Use hist() and density() to identify your distr

[R] Re: estimate the parameter of exponential distribution, etc.

2005-02-23 Thread Vito Ricci
Hi David, You can estimate parameters using fitdistr() in MASS package. I suggest also to read my contribute "Fitting distributions with R" available on CRAN: http://cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf Best regards, Vito you wrote: Given a numeric vector of observations,

[R] Fitting distributions

2005-02-17 Thread Vito Ricci
Dear UseRs, I'm glad to inform that an English version of my contribute concerning fitting distributions is now available on CRAN: http://cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf Any comments will be appreciated. Best regards, Vito = Diventare costruttori di soluzioni Beca

[R] Re: testing slopes different than a given value

2005-02-11 Thread Vito Ricci
Hi, We know that a regression coefficent fitted by sample data (under usual linear model hypothesis) b_hat has mean=b and se=se(b_hat); (b_hat-b)/s(b_hat) is distributed as Student’s t distribution with df=n-2. So you can test h0:b=b0 hA:b<>b0 using t test (for large sample normal distribution is

[R] Re:logistic regression

2005-02-08 Thread Vito Ricci
Hi, I don't know if a pseudo squared R for glm exists in any R package, but I find some interesting functions in S mailing list: http://www.math.yorku.ca/Who/Faculty/Monette/S-news/0422.html Here are some functions for calculating (pseudo-)R^2, which may be of use to some. Rsquared <- function(

[R] R: Creating a correlation Matrix

2005-02-07 Thread Vito Ricci
Hi, see ?cor in base package to get correlation matrix for your data. Maybe it could be usefull getting principal components (give a look to: ? princomp (base)) to reduce the number of variables. Hoping I helped you. Best regards, Vito You wrote: Hi all: I have a question on how to go about c

[R] Re: nonparametric manova

2005-02-03 Thread Vito Ricci
Hi Vera, See: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/22273.html it seems like your problem. Best regards, Vito you wrote: Dear colleagues, has anyone an idea how to carry out a nonparametric manova for comparing 3 groups? Thank you for your help. Vera = Diventare costruttori d

[R] Re: consultation

2005-01-31 Thread Vito Ricci
Hi, see these papers or books (some are available on the web): Diego Kuonen, Introduction au data mining avec R : vers la reconqu?te du `knowledge discovery in databases' par les statisticiens. Bulletin of the Swiss Statistical Society, 40:3-7, 2001. http://www.statoo.com/en/publications/2001.R.

[R] Re: Begginer with R

2005-01-31 Thread Vito Ricci
Hi, see this web page: http://www.stats.ox.ac.uk/~vos/DataMining.html you'll find something about classification with examples: 4. Classification Decision theory, Linear discriminant analysis, Quadratic discriminant analysis, Fisher's LDA, Logistic discrimination, Non-parametric classification t

[R] GLM fitting

2005-01-28 Thread Vito Ricci
DeaR R-useRs, I'm trying to fit a logist model with these data: > dati y x 1 1 37 2 1 35 3 1 33 4 1 40 5 1 45 6 1 41 7 1 42 8 0 20 9 0 21 10 0 25 11 0 27 12 0 29 13 0 18 I use glm(), having this output: > g<-glm(y~x,family=binomial,data=dati) Warning messages: 1: Algorithm did not

RE: [R] Fitting distribution with R: a contribute

2005-01-26 Thread Vito Ricci
x27;t know enough italian to be useful for this > task! > > Regards > > Francisco > > >From: Vito Ricci <[EMAIL PROTECTED]> > >To: r-help@stat.math.ethz.ch > >Subject: [R] Fitting distribution with R: a > contribute > >Date: Tue, 25 Jan 20

[R] Re: spearman rank test correlation

2005-01-25 Thread Vito Ricci
Hi, see: http://finzi.psych.upenn.edu/search.html and search for "Spearman test" there are many results; for Spearman rank test see: cor.test(, method="spearman") ? cor.test ? rcorr {Hmisc} ? spearman2 (Hmisc) http://finzi.psych.upenn.edu/R/library/Hmisc/html/rcorr.html Regards, Vito you

[R] Fitting distribution with R: a contribute

2005-01-25 Thread Vito Ricci
Dear R-useRs, I've written a contribute (in Italian language) concering fitting distribution with R. I believe it could be usefull for someones. It's available on CRAN web-site: http://cran.r-project.org/doc/contrib/Ricci-distribuzioni.pdf Here's the abstract: This paper deals with distribution

[R] R: text miner:

2005-01-24 Thread Vito Ricci
See: http://wwwpeople.unil.ch/jean-pierre.mueller/ ttda - tools for textual data analysis Regards Vito you wrote: Hi, Does a text miner exist in R-language similar to Splus miner or SAS text miner? I would appreciate any information. TIA, Aldi = Diventare costruttori di soluzioni Became

[R] R: chi-Squared distribution in Friedman test

2005-01-21 Thread Vito Ricci
Hi, pchisq -> distribution function dchisq -> density function pval is the area under the curve, to calculte it you use distribution function which is the integral of density function. See: http://www.itl.nist.gov/div898/handbook/eda/section3/eda362.htm http://mathworld.wolfram.com/DistributionF

[R] R: chi-Squared distribution

2005-01-21 Thread Vito Ricci
Hi, Attention chi-squared distribution, unlike F distribution, has only df1 as parameter, not df1 and df2. So correct into: outer(1:3, 1:3, function(df1, df2) qchisq(0.95, df1, df2)) outer(1:3, 1:3, function(df1, df2) qchisq(0.95, df1)) Regards, Vito

[R] Re: suggestion on data mining book using R

2005-01-20 Thread Vito Ricci
Hi, see these links: http://www.liacc.up.pt/~ltorgo/DataMiningWithR/ http://sawww.epfl.ch/SIC/SA/publications/FI01/fi-sp-1/sp-1-page45.html Brian D. Ripley, Datamining: Large Databases and Methods, in Proceedings of “useR! 2004 - The R User Conference”, may 2004 http://www.ci.tuwien.ac.at/Confer

[R] Re: Skewness test

2005-01-18 Thread Vito Ricci
Hi Christian, see this links for skewness tests: http://www.xycoon.com/skewness_test_1.htm http://www.xycoon.com/skewness_test_2.htm http://www.xycoon.com/skewness_small_sample_test_1.htm http://www.xycoon.com/skewness_small_sample_test_2.htm there you can find some help to solve your problem.

[R] chisq.test() as a goodness of fit test

2005-01-13 Thread Vito Ricci
Dear R-Users, How can I use chisq.test() as a goodness of fit test? Reading man-page I’ve some doubts that kind of test is available with this statement. Am I wrong? X2=sum((O-E)^2)/E) O=empirical frequencies E=expected freq. calculated with the model (such as normal distribution) See: http://

[R] Re:Time-Series

2005-01-13 Thread Vito Ricci
Hi, you can address to a single ts in a multivariate ts object by namets[,index]. See this example: > dati X Y 1 100 200 2 150 210 3 180 220 4 200 230 5 220 250 > serie<-ts(dati,start=1999) > serie Time Series: Start = 1999 End = 2003 Frequency = 1 X Y 1999 100 200 2000 150 210

[R] Re: multivariate diagnostics

2005-01-13 Thread Vito Ricci
Hi, give a look to the package: mvnormtest Normality test for multivariate variables http://www.biometrics.mtu.edu/CRAN/src/contrib/Descriptions/mvnormtest.html it includes a multivariate extention of Shapiro test. I believe in statistical literature, I read somewhere, exists a multiva

[R] Re: Kolmogorov-Smirnof test for lognormal distribution with estimated parameters

2005-01-11 Thread Vito Ricci
Hi, I believe that to performe KS test parameters must not be estimated by sample data. Despite some advantages, the KS test has several important limitations: 1. It only applies to continuous distributions. 2. It tends to be more sensitive near the center of the distribution than at the t

[R] Re:MASS installation

2004-12-22 Thread Vito Ricci
Dear Angela, to install MASS package you can choose installing from CRAN. Go to menu Packages--> Install package(s) from CRAN; appears a window (Select) select MASS; in this way MASS will be downloaded - you need to be connected with Internet, preferibly ADSL, it'll be faster; look in Packages-->L

[R] Scatterplot question

2004-12-09 Thread Vito Ricci
Hi, you can see: ?matplot Best Vito you wrote: Dear list members, I have a probably simple question concerning scatterplots: I want to draw a plot with one X but several Y columns, so that every group of samples gets a different symbol. My table looks like this: X Y1 Y2 Y3

[R] Re:How can I estimate parameters of probability distributions?

2004-12-09 Thread Vito Ricci
Hi, To estimate parameters of exponential distribution you could use the Maximun Likelihood methods. Find the log-likelihood function and maximaze it(or minimaze -log-likelihood function that's the same) calculating the derivate respect to lamda. See: http://www.weibull.com/LifeDataWeb/maximum_l

[R] Re: (no subject)

2004-12-06 Thread Vito Ricci
Hi, see: http://agec221.agecon.uiuc.edu/csiss/Rgeo/ for R-Spatial Models, are there many packages for spatial data analysis. Regards Vito you wrote: I need information about space state models in structural model and kalman filtering. I have a univariate time serie and i nedd aplicate space s

[R] R: vector to matrix transformation

2004-12-03 Thread Vito Ricci
Hi, did you see: as.data.frame() as.matrix() as.vector() matrix() > x a b c 1 1 2 3 2 1 2 3 3 2 3 4 4 3 4 5 > is.data.frame(x) [1] TRUE > as.matrix(x) a b c 1 1 2 3 2 1 2 3 3 2 3 4 4 3 4 5 > y<-as.matrix(x) > is.matrix(y) [1] TRUE > as.vector(y) [1] 1 1 2 3 2 2 3 4 3 3 4 5 > z<-as.vector(y)

[R] R: Computation of space-time empirical crosscovariances

2004-12-02 Thread Vito Ricci
Hi, see: http://agec221.agecon.uiuc.edu/csiss/Rgeo/ for R-spacial packages! Regards Vito you wrote: Dear all, Is there any "simple" way to estimate an empirical crosscovariance function for space-time data? More precisely if I have n space locations in T times on which I observe one variable,

[R] Re: A somewhat off the line question to a log normal distribution

2004-12-02 Thread Vito Ricci
Dear Siegfried, I believe your boss is wrong saying that: >He also tried to explain me that the monthly means >(based on the daily measurements) must follow a >log-normal distribution too then over the course of a year. every statistician know that increasing the sample size the sample distributi

[R] RE: prediction

2004-12-01 Thread Vito Ricci
Try to use neural network for prediction: see package nnet. Regards Vito you wrote: Hi! I have a dataset of the lifespans (birth/death date) of about 100,000 people. I also have the birth dates of about 1,000,000 people who are still alive. I also have other information for each of these people

[R] Re: request for help on statistical applications in pharma

2004-12-01 Thread Vito Ricci
Hi Krishna, I don't have direct exeperience in using statistics in pharma industry, but I know that some notes (in Italian) of prof. Soliani are used in courses taken for Italian Pharma Industries. You can find that at this address: http://www.dsa.unipr.it/soliani/soliani.html I try to translate

[R] Ts analysis with R: a contribute in Italian language

2004-11-29 Thread Vito Ricci
Dear All, I wish to inform, especially Italian speaking R-users, that on CRAN web site is now available a contribute (in Italian language) about using R in ts analysis. Any comments would be appreciated. Best regards, Vito = Diventare costruttori di soluzioni Became solutions' constructors

[R] Re: (no subject)

2004-11-25 Thread Vito Ricci
Angela Re wrote: > Good morning, > I tried to apply the ks test to a Student distribution by ks.test(input, > "pt", ncp = 0, df = 58) or ks.test(input, "pt", df = 58) without success > where input contains my data and 58 is the fredoom degree number. Why? > Thank you, Angela It runs also for m

[R] Re: how to remove time series trend in R?

2004-11-25 Thread Vito Ricci
Hi Terry, If I understood your problem you would estimate trend and seasonal (as sum of sin and cos) in a ts. If t is time, Y is your ts, T=f(t) is trend function of time (it could be linear, quadratic, etc. as better is for your data), e=errors/residuals Your model to fit will'be: Y(t)=T(t)+

[R] R vs SPSS

2004-11-25 Thread Vito Ricci
Dear all, in last weeks you discussed about R vs SAS. I want to ask your opinion about a comparison between R and SPSS. I don't know this software, but some weeks ago I went to a presentation of this product. I found it really user-friendly with GUI (even if I'd prefer command line) and very usef

[R] Re: T-test syntax question

2004-11-24 Thread Vito Ricci
Hi, In case of paired data, if you have only differencies and not original data you can get this t test based on differencies: Say d is the vector with differencies data and suppose you wish to test if the mean of differency is equal to zero: md<-mean(d) ## sample mean of differencies sdd<-sd(d)

[R] Ks.test (was (no subject))

2004-11-24 Thread Vito Ricci
Hi Angela, I believe you should introduce only df as parameters; t distribution as by default mean=0; see this example. > x<-rt(100,10) > ks.test(x, "pt",10) One-sample Kolmogorov-Smirnov test data: x D = 0.1414, p-value = 0.03671 alternative hypothesis: two.sided Ciao Vito you wro

[R] T-test syntax question

2004-11-24 Thread Vito Ricci
Hi, You did not specify if data are paired or not, as data are paired you should use option paired=TRUE in t.test(). Variances of the two samples have to be not significatevely different, (see ? var.test) to use t.test, if not you should specify var.equal=FALSE. var.equal: a logical variable indi

[R] R: simulation of Gumbel copulas

2004-11-22 Thread Vito Ricci
I'm sorry for another posting, but I found also this message in S news: http://www.biostat.wustl.edu/archives/html/s-news/2000-01/msg00058.html Bye Vito you wrote: Dear R: Is there a function or a reference to simulate Gumbel copulas, please? Thanks in advance! = Diventare costruttori d

[R] R: simulation of Gumbel copulas

2004-11-22 Thread Vito Ricci
Hi, I found this document, but it concerns S+. If it could interest you'll see: http://faculty.washington.edu/ezivot/book/QuanCopula.pdf Cordially Vito You wrote: Dear R: Is there a function or a reference to simulate Gumbel copulas, please? Thanks in advance! Sincerely, Erin Hodgess mai

[R] Re: Informix database

2004-11-18 Thread Vito Ricci
Hi, see DBI: R/S-Plus Database Interface, maybe it could help you: http://stat.bell-labs.com/RS-DBI http://www.ci.tuwien.ac.at/Conferences/DSC-2001/Proceedings/HothornJamesRipley.pdf I found: Other Database Connections from S-Plus Depending on the platform it's running, S-Plus provides access

[R] Re: referencing values of strings

2004-11-17 Thread Vito Ricci
Hi, see ? as.numeric as.numeric(c("-.1"," 2.7 ","-1.5")) [1] -0.1 2.7 -1.5 you wrote: Say you have a vector named x and a function which returns the character string "x" . How would I take "x" as an input and return the vector x? = Diventare costruttori di soluzioni Became solutions' con

[R] Re: R: log-normal distribution and shapiro test

2004-11-17 Thread Vito Ricci
t generous and everything is a > Gaussian or > log-Gaussian distribution, because how can I be sure > that the underlying > data to not have any serious flaws? Statistics is > black art - right? > > Regards, > S. Gonzi > > > > Vito Ricci wrote: > >

[R] R: log-normal distribution and shapiro test

2004-11-17 Thread Vito Ricci
Hi, from what you're writing: "The logaritmic transformation "shapiro.test(log10(y))" says: W=0.9773, p-value= 2.512e-05." it seems the log-values are not distributed normally and so original data are not distributed like a log-normal: the p-value is extremally small! Other tests for normality ar

[R] R: Changing zeros to NAs in a data frame

2004-11-16 Thread Vito Ricci
Hi, see this example. I hope I helped you a little bit. Bye Vito dati X YZ 1 10 0 "0" 2 0 20 "60" 3 30 40 "50" 4 11 12 3" > dati[dati==0]<-NA > dati X YZ 1 10 NA "0" 2 NA 20 "60" 3 30 40 "50" 4 11 12 3" = Diventare costruttori di soluzioni Became solutions' cons

[R] R: how can draw probability density plot?

2004-11-15 Thread Vito Ricci
I believe this is better and that you want! x<-rnorm(1000,10,1) plot( function(y) dnorm(y, mean(x), sd(x)), from=min(x), to=max(x)) best vito You wrote: Dear support, I want to draw a probability density plot in R. For example, I provide the mean and variance of a normal distribution, then R

[R] R: how can draw probability density plot?

2004-11-15 Thread Vito Ricci
I hope this example could help you best vito > x<-seq(-3.5,3.5,0.1) > x [1] -3.5 -3.4 -3.3 -3.2 -3.1 -3.0 -2.9 -2.8 -2.7 -2.6 -2.5 -2.4 -2.3 -2.2 -2.1 [16] -2.0 -1.9 -1.8 -1.7 -1.6 -1.5 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 [31] -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6

[R] Mode in case of discrete or categorial data

2004-11-12 Thread Vito Ricci
Thanking John for his suggestion I build this function which get the mode of both categorial and discrete data. Mode<-function(x){t<-table(x) if (is.numeric(x)) as.numeric(names(t)[t == max(t)]) else (names(t)[t == max(t)]) } Any other improvement and suggestion will welcome. Best Vito > s [

[R] How to get mode in case of discrete or categorial data

2004-11-12 Thread Vito Ricci
Dear all, in a previuos message was asked how get the mode of continous distribution. Now I'm asking if there an R function to obtain the mode in case of a discrete distribution or categorial data. The only way is to use table(): > x<-rep(1:5,100) > s<-sample(x,40) > t<-table(s) > t s 1 2 3

[R] Re: How to get mode (the most frequent value in distribution)?

2004-11-12 Thread Vito Ricci
Hi Gregor, if you have a continous distribution is rather difficult that the same value is repeated many times. In this case I believe you could not find the mode (the most frequent value in distribution) as your distribution is continous, but only the modal class/interval (the interval of the di

[R] Re: (no subject)

2004-11-11 Thread Vito Ricci
Please could you specify better your problem, an example would be appreciatted. If you explain in a clear way we can help you. Please read posting-guide: http://www.r-project.org/posting-guide.html Cordially Vito You wrote: Hi, I have a list of numbers. For each of the numbers, I take sum o

[R] fSeries

2004-11-10 Thread Vito Ricci
Hi, see ? garch in tseries package. library(tseries) > garch(x) * ESTIMATION WITH ANALYTICAL GRADIENT * Warning: singular information Call: garch(x = x) Coefficient(s): a0 a1 b1 8.564e-07 5.000e-02 5.000e-02 Best Vito You wrote: Good morning everyon

[R] Loading some function at R startup

2004-11-10 Thread Vito Ricci
i dati, ## compresi in nomi delle colonne ## Autore: Vito Ricci email:[EMAIL PROTECTED] ## Data di creazione: 09/11/04 } esporta.in.excel<-function(dati){write.table(dati,"clipboard", sep="\t", dec=",", col.names=NA) ## questa funzione consente di esportare dati in

[R] Skewness and Kurtosis

2004-10-27 Thread Vito Ricci
Hi, in which R-package I could find skewness and kurtosis measures for a distribution? I built some functions: gamma1<-function(x) { m=mean(x) n=length(x) s=sqrt(var(x)) m3=sum((x-m)^3)/n g1=m3/(s^3) return(g1) } skewness<-function(x) { m=mean(x) me=median(x) s=sqrt(var(x)) sk=(m-me)/s return(s

Re:[R] Combining columns of different length

2004-10-26 Thread Vito Ricci
Hi, you can use this simple function: add.col<-function(df, new.col) {n.row<-dim(df)[1] length(new.col)<-n.row cbind(df, new.col) } see this example: > x<-cbind(c(1,2,3),c(4,5,6)) > x [,1] [,2] [1,]14 [2,]25 [3,]36 >

[R] Re: Importing big plain files from ERP-System/Data Mining with R

2004-10-26 Thread Vito Ricci
Hi, as concern R & datamining & large databases you can see those resources: Diego Kuonen, Introduction au data mining avec R : vers la reconquête du `knowledge discovery in databases' par les statisticiens. Bulletin of the Swiss Statistical Society, 40:3-7, 2001. http://www.statoo.com/en/publicat

[R] Convert a list in a dataframe

2004-10-22 Thread Vito Ricci
Hi, I've a list containing parameters (intercepts & coefficients) of 12 regressions fitted > coeff [[1]] (Intercept) anno -427017.1740 217.0588 [[2]] (Intercept) anno -39625.82146 21.78025 . [[12]] (Intercept)anno 257605.0343 -129.7646 I want crea

[R] R & Graphs

2004-10-20 Thread Vito Ricci
Dear R-users, I'm finding for a R-package concerning graphs. Is there some kind of that package? I've a set of correlation coeffients between several variable and I wish to built a graph to link variables correlated. Many thanks. Best, Vito = Diventare costruttori di soluzioni "The busine

[R] Time series reference card

2004-10-19 Thread Vito Ricci
Hi, I wish to informe all of you that on the CRAN is now available a short document concerning the main R functions for time series analysis. PDF format: http://cran.r-project.org/doc/contrib/Ricci-refcard-ts.pdf DOC format: http://cran.r-project.org/doc/contrib/Ricci-refcard-ts.doc Best Vito

[R] Re: Testing for normality of residuals in a regression model

2004-10-15 Thread Vito Ricci
Dear Federico, see: ? shapiro.test(stats) Shapiro-Wilk Normality Test and ? jarque.bera.test(tseries) Jarque-Bera Test They are the most common tests used for normality testing. Ciao Vito Federico Gherardini wrote on Fri Oct 15 14:44:18 CEST 2004: Hi all, Is it poss

[R] R & Neural Networks

2004-10-15 Thread Vito Ricci
Hi, are other R-packages using neural networks tecniques? I've already found nnet. Thanks Best Vito = Diventare costruttori di soluzioni "The business of the statistician is to catalyze the scientific learning process." George E. P. Box Visitate il portale http://www.modugno.it/ e in

[R] Statistical analysis of a large database

2004-10-12 Thread Vito Ricci
Hi, for your analysis use the package: ROracle Oracle database interface for R http://microarrays.unife.it/CRAN/src/contrib/Descriptions/ROracle.html see also: Diego Kuonen, Introduction au data mining avec R : vers la reconquête du `knowledge discovery in databases' par les statisticiens. Bul

Re: [R] Correlation Matrix

2004-10-08 Thread Vito Ricci
Hi Sundar, many thanks for your suggestion: it's just I wished! Best Vito --- Sundar Dorai-Raj <[EMAIL PROTECTED]> ha scritto: > > > Vito Ricci wrote: > > > Hi, > > > > I'm dealing with a datamining analysis: I've a lot > of >

[R] Correlation Matrix

2004-10-08 Thread Vito Ricci
Hi, I'm dealing with a datamining analysis: I've a lot of categories of product sold per week (n. week =26, n. categories about 50. my dataframe is like this: Settimana ALIMENTI..ALTRI. ALIMENTI.APROTEICI 1 13 19 2 22

[R] Need R Version 1.8.0 or earlier

2004-10-05 Thread Vito Ricci
Hi, you didn't specify on which OS (Linux, Win, Mac) would run R 1.8. For R souces see: http://cran.r-project.org/src/base/R-1/ Best Vito You wrote: Hello. I need R in Version 1.8.0 or earlier. I also need the packages foreign, x-table and gregmisc for this version. Does anyone know where I

[R] read dbf files into R

2004-09-28 Thread Vito Ricci
Hi, read the manual: R Data Import/Export http://cran.r-project.org/doc/manuals/R-data.pdf Another way is to convert .dbf file in .txt and use read.table(), scan() an similar. Best Vito You wrote: I run R on redhat linux. What would be the easiest way to read dbf files into R? Vikas =

[R] detection of outliers

2004-09-23 Thread Vito Ricci
Hi, give a look to: http://www.itl.nist.gov/div898/handbook/eda/section3/eda35h.htm it's the Grubbs' Test for Outliers. It is based on the assumption of normality of data. Other methods of outliers' could: Run-Sequence Plot Histogram Normal Probability Plot Box-plot Best Vito you wrote: Hi

[R] t test problem?

2004-09-22 Thread Vito Ricci
Hi Liu, I'd suggest you to use non-parametric tests (see http://www.cas.lancs.ac.uk/glossary_v1.1/nonparam.html) such as: wilcox.test() in stats package pairwise.wilcox.test() in stats package and see the result tou got (significancy/non significancy) and compare it with t test result; Parametr

[R] t test problem?

2004-09-22 Thread Vito Ricci
Hi, maybe your data are distributed according a log-normal distribution, so logs are normally distributed. But remerber the significancy of t test can applied only on log transformated data and not on original data. See basic hypothesis for t testing, in alternative use non-parametric methods to c

[R] S-PLUS and R

2004-09-21 Thread Vito Ricci
Hi, a shortcut to import data from an Excel sheet is: In Excel 1) select cells including data 2) press CTRL+C (copy in clipboard) open a window starting R In R type read.delim("clipboard",header=TRUE) if the are headers in excel data or read.delim("clipboard",header=FALSE) if there are not hea

[R] S/R and data mining (was can't understand "R")

2004-09-21 Thread Vito Ricci
Hi Thomas, see these papers or books (some are available on the web): Diego Kuonen, Introduction au data mining avec R : vers la reconquête du `knowledge discovery in databases' par les statisticiens. Bulletin of the Swiss Statistical Society, 40:3-7, 2001. Consultabile all’indirizzo web: http://

[R] montecarlo simulation

2004-09-20 Thread Vito Ricci
Ciao Francesca, here are some examples or R code using montecarlo simulation concernig parameters estimates of sever random variables: Estimate of parameter theta of a uniform variable with ML method Stima del parametro theta di una v.a. unif(0,theta) con metodo dei momenti e confronto con la st

[R] newbie needs help using R as solver

2004-09-16 Thread Vito Ricci
Hi, it a LP problem. It's not just a function to optimize (in this way optim() and optimize() are not usefull), but a linear system grouping sever equations/dis-equations. See package linprog and boot. See these link about LP: http://www.ece.northwestern.edu/OTC/ http://www.isye.gatech.edu/~spyr

[R] Density Estimation

2004-09-15 Thread Vito Ricci
ittle help. Cordially Vito Ricci [EMAIL PROTECTED] wrote: Hi there, Sorry if this is a rather loing post. I have a simple list of single feature data points from which I would like to generate a probability that an unseen point comes from the same distribution. To do this I am trying to estimate the p

[R] converting to data frame

2004-09-10 Thread Vito Ricci
Hi, see ? read.csv and use read.csv() to read the csv file, after convert as a data.frame see: ? as.data.frame it forces into a data.frame; e.g. you've the data csv file: data.csv mydata<-read.csv('C:/data.csv') mydf<-as.data.frame(mydata) ## data as dataframe bye Vito Is there a method

[R] Giving a first good impression of R to Social Scientists

2004-08-12 Thread Vito Ricci
Hi, do you know there are several GUI for R? See: http://www.sciviews.org/_rgui/ and in particular: http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/ R-Commander is quite like GUI of commercial softwares. Give a look: they can help your pupils which are able to use SPSS. Although I prefer command li

[R] Help with generating data from a 'not quite' Normal distriburtion

2004-08-12 Thread Vito Ricci
Hi, Also the Cauchy's distribution could be good: rcauchy(n, location = 0, scale = 1) Best Vito I would be very grateful for any help from members of this list for what might be a simple problem... We are trying to simulate the behaviour of a clinical measurement in a series of computer expe

[R] Help with generating data from a 'not quite' Normal distriburtion

2004-08-12 Thread Vito Ricci
Hi, the Student's t distribution could be considered: it's symmetrical, but with a low number of degree of freedom is different from Normal distribution I think in the way you said:"has a much higher peak at the mean and the distribution has much longer tails. " Try to use: rt(n, df) where n=nu

[R] Advice on picking a regression method

2004-08-11 Thread Vito Ricci
Dear Thomas, I believe a GLS (Generalized Least Squares, known also as Aitken estimator) estimate could be used in case of heteroskedasticity of residuals. See: ? lm.gls in MASS package or ? gls in nlme package Another way is to study the relentionship between x (indipendent variable) and the v

  1   2   >