[R] How to get the P-values from GLM results?

2008-03-19 Thread Alex Wang
Hello all, I have a question concerning how to get the P-value for a explanatory variables based on GLM. I'll run multiple regressions with GLM, and I'll need the P-value for the same explanatory variable from these multiple GLM results. I check the help and there are quite a few Value

Re: [R] How to get the P-values from GLM results?

2008-03-19 Thread C.H.
abc - glm(x~y) summary(abc) On Wed, Mar 19, 2008 at 11:51 AM, Alex Wang [EMAIL PROTECTED] wrote: Hello all, I have a question concerning how to get the P-value for a explanatory variables based on GLM. I'll run multiple regressions with GLM, and I'll need the P-value for the same

Re: [R] How to get the P-values from GLM results?

2008-03-19 Thread Bill.Venables
Why use glm(...) for a multiple regression? A multiple regression model is just an LM, not a GLM. glm(...) is the long way round, at best. ___ fm - lm(y ~ x1+x2+..., data = myData) ## fits the model summary(fm)## will show you the tests, including p-values pv - summary(fm)$coef[,

[R] ROC analysis

2008-03-19 Thread Eleni Christodoulou
Hello list, I am trying to perform ROC analysis and count the AUC in order to validate my results. I use package ROCR. I would like to count the AUC not under the cutoff found by performance but to use another cutoff that I calculate. How could I change the following command in order to get what

Re: [R] Puzzled at generating combinations

2008-03-19 Thread Petr PIKAL
Or he can use expand grid expand.grid(paste(r,1:3, sep=), paste(R, 1:3, sep=)) Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 18.03.2008 17:15:54: I have two data frames. Suppose the first has rows r1 r2 r3 and the second has rows R1 R2 R3 I'd like to

Re: [R] Error when producing multiple graphes

2008-03-19 Thread bartjoosen
Could you provide us some working codo, so that we can reproduce the error and see what went wrong? Uli Kleinwechter wrote: Dear all, Within a larger script I use the following code to produce barplots for all variables contained in a dataframe type3m: for(xn in names(type3m))

Re: [R] Error when producing multiple graphes

2008-03-19 Thread Uli Kleinwechter
bartjoosen schrieb: Could you provide us some working codo, so that we can reproduce the error and see what went wrong? Of course. Here is the relevant part of the code I'm working with. I suppose it will be helpful for you to have the csv file, as well. But as an attachment will be

Re: [R] ROC analysis

2008-03-19 Thread Richard Pearson
Eleni Does the fpr.stop argument do what you want? This is described in ?performance under the details of the auc measure. Try, e.g. perform=performance(pred,measure=auc,fpr.stop=0.5) Richard. Eleni Christodoulou wrote: Hello list, I am trying to perform ROC analysis and count the AUC in

[R] running balance down a dataframe referring back to previous row

2008-03-19 Thread seanpor
Good morning, I've searched high and low and I've tried many different ways of doing this, but I can't seem to get it to work. I'm looking for a way of vectorising a running balance; i.e. the value in the first row of the dataframe is zero, and following rows add to this running balance. This

[R] Sweave does not parse \Sexpr{}

2008-03-19 Thread Werner Wernersen
Hi, has anybody encountered and solved the following problem? I continued work now on a different computer where I have also used Sweave successfully before. I can run Sweave() and it generates a .tex file. All code chunks are processed and translated to Latex perfectly fine but somehow only the

[R] log-likelihood/MISE from spline

2008-03-19 Thread Tarek Salman Khan
Hi R users!!! I am looking for a very short command to get the log-likelihood (penalized log-likelihood)/MISE while using the B-spline (bs()), smooth.spline(), or cubic spline. Is it possible to get that result from the existing commands? And can give some instruction to compute it either. Tarek

Re: [R] Error when producing multiple graphes

2008-03-19 Thread Uli Kleinwechter
Sorry. My last message maybe was not very helpful. Please find here a more concise form of the code. It produces a dataframe of more or less the characteristics of the one that I use and yields the same error message: * x1-c(1,2,3,4,NA ,NA ,NA, 3, 1, 1, 1, 1, 2, 2, 3, 4, 4)

[R] sort

2008-03-19 Thread Alfons Sutter
Hello, Is there any function in R which sorted data as x1 - c(1,3,2,4,5,1) x2 - c(2,0,2,3,5,2) TheData - data.frame(x1,x2) TheData1 - sort(TheData, by=c(x1,x2)) Thanks in advance! Alfons

Re: [R] sort

2008-03-19 Thread Richard . Cotton
Is there any function in R which sorted data as x1 - c(1,3,2,4,5,1) x2 - c(2,0,2,3,5,2) TheData - data.frame(x1,x2) TheData1 - sort(TheData, by=c(x1,x2)) Yes; see ?order and the R FAQ 7.23 http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-sort-the-rows-of-a-data-frame_003f Regards,

Re: [R] sort

2008-03-19 Thread Alfons Sutter
I found the following function which solves the problem! lsort - function(data, by = 1:dim(data)[2], asc = rep(T, length(by)), na.last = T){ # # this function works like the SAS SORT procedure # # data: a dataframe or a matrix, dimnames are used as the variable names # # by: a vector or a

Re: [R] Table of basic descriptive statistics like SPSS

2008-03-19 Thread Jim Lemon
Just to forestall confusion amongst those who would like to use one of the functions called describe... Hmisc package - describe numeric name count of observations count of missing values count of unique values mean seven quantiles five lowest and highest values discrete (factor or

Re: [R] ROC analysis

2008-03-19 Thread Eleni Christodoulou
Richard, thanks, I think it will work. I will calculate the cutoff value and then, from the prediction object, find the fpr that is related to it and put it as argument to performance. I will keep you informed. Eleni On Wed, Mar 19, 2008 at 11:51 AM, Richard Pearson [EMAIL PROTECTED] wrote:

Re: [R] Sweave does not parse \Sexpr{}

2008-03-19 Thread Tobias Verbeke
Werner Wernersen wrote: Hi, has anybody encountered and solved the following problem? I continued work now on a different computer where I have also used Sweave successfully before. I can run Sweave() and it generates a .tex file. All code chunks are processed and translated to Latex

Re: [R] sort

2008-03-19 Thread Alfons Sutter
Thank you :-) - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Alfons Sutter [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, March 19, 2008 11:01:29 AM Subject: Re: [R] sort Is there any function in R which sorted data as x1 -

Re: [R] Sweave does not parse \Sexpr{}

2008-03-19 Thread Tobias Verbeke
Werner Wernersen wrote: Hi, has anybody encountered and solved the following problem? I continued work now on a different computer where I have also used Sweave successfully before. I can run Sweave() and it generates a .tex file. All code chunks are processed and translated to Latex

Re: [R] Sweave does not parse \Sexpr{}

2008-03-19 Thread Duncan Murdoch
Werner Wernersen wrote: Hi, has anybody encountered and solved the following problem? I continued work now on a different computer where I have also used Sweave successfully before. I can run Sweave() and it generates a .tex file. All code chunks are processed and translated to Latex

Re: [R] ls() and classes

2008-03-19 Thread Martin Maechler
GaGr == Gabor Grothendieck [EMAIL PROTECTED] on Tue, 18 Mar 2008 23:50:28 -0400 writes: GaGr Try: GaGr eapply(.GlobalEnv, class) GaGr or perhaps GaGr unlist(eapply(.GlobalEnv, class)) GaGr or GaGr str(eapply(.GlobalEnv, class)) nice! {and we've also seen the

Re: [R] sqlSave (RODBC) question

2008-03-19 Thread Olivier Lefevre
FWIW, this is on SQL Server. -- O.L. __ 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,

Re: [R] Sweave does not parse \Sexpr{}

2008-03-19 Thread Werner Wernersen
Sorry about the lack of detail. Some facts: - code chunks are processed fine - Sweave.sty file is in the same directory as the test.Rnw file - all running on Windows 2000 Professional Here is the full session detail: Sweave(test.Rnw, debug=T) Writing to file test.tex Processing code chunks

Re: [R] how to reset slogic.f file

2008-03-19 Thread Henric Nilsson (Public)
coldeyes Liao wrote: Hi there: recently i try to use LogicReg package for a tree model(logistics fit ) i list my code and error below: dim(model.dat) [1] 48000 745 fit1 - logreg(resp = model.dat[,745], bin=model.dat[, 9:700], type = 3, select = 3, ntrees = c(1,2), nleaves=c(1,7),

Re: [R] S4 : dumpMethod

2008-03-19 Thread Martin Maechler
CG == Christophe Genolini [EMAIL PROTECTED] on Tue, 18 Mar 2008 20:55:09 +0100 writes: CG Hi the list, CG I almost finished the green book (chapter 7 and 8 on S4), this is CG probably one of my last question :-) CG I hope you will not miss them to much ! CG Here is my

[R] R CMD SHLIB errors

2008-03-19 Thread sun
I got errors when I tried to compile my code into dll on XP box. C:/R/R-2.6.2/src/gnuwin32/MkRules:235: warning: overriding commands for target `.c.d' C:/R/R-2.6.2/src/gnuwin32/MkRules:223: warning: ignoring old commands for target `.c.d' C:/R/R-2.6.2/src/gnuwin32/MkRules:255: warning:

Re: [R] R CMD SHLIB errors

2008-03-19 Thread Prof Brian Ripley
Using 'mingw32-make' indicates that you have not followed the instructions accurately. You *must* have the Rtools/bin directory ahead of all other tools in your PATH. Please check again (and again) that you have followed the prescription in 'R Installation and Administration'. On Wed, 19 Mar

Re: [R] Error when producing multiple graphes

2008-03-19 Thread Uli Kleinwechter
I just solved the problem. The error happened because of the empty variables in the dataframe. In any case, thanks for caring. bartjoosen schrieb: Could you provide us some working codo, so that we can reproduce the error and see what went wrong? Uli Kleinwechter wrote: Dear all,

[R] Table for clustering dendrogram

2008-03-19 Thread yvo
Dear all, I am using the hclust method in R. I am building nice dendrograms with it. Actually for my further analysis I want to get the number of bifurcations (bif) for each object (labels) in the dendrogram. That has to be calculated by the colums merge, height and order.

[R] How to remove double for loop?

2008-03-19 Thread Jonas Malmros
Hello everyone. I use double for loops to fill in matrices, but there are surely better (and computationally faster) ways to perform that task. Could someone show me, given the following example of a double for loop, how this could be done? It is much easier to learn by examples. Val - matrix(0,

Re: [R] ROC analysis

2008-03-19 Thread Frank E Harrell Jr
Eleni Christodoulou wrote: Richard, thanks, I think it will work. I will calculate the cutoff value and then, from the prediction object, find the fpr that is related to it and put it as argument to performance. I will keep you informed. Eleni You will probably need to bootstrap the entire

Re: [R] How to remove double for loop?

2008-03-19 Thread Bill.Venables
One possibility might be Val - outer(0:n, 0:n, function(i, j) ifelse(i = j, u^i*d^(j-i), 0)) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonas Malmros Sent: Wednesday, 19 March 2008 9:24 PM To: r-help@r-project.org Subject: [R] How to remove double

Re: [R] How to remove double for loop?

2008-03-19 Thread Alberto Monteiro
Jonas Malmros wrote: I use double for loops to fill in matrices, but there are surely better (and computationally faster) ways to perform that task. Could someone show me, given the following example of a double for loop, how this could be done? It is much easier to learn by examples. Val

Re: [R] How to remove double for loop?

2008-03-19 Thread Gabor Grothendieck
Try this: V - diag(n+1); i - row(V) - 1; j - col(V) - 1 (j i) * u ^ i * d ^ (j - i) On Wed, Mar 19, 2008 at 7:24 AM, Jonas Malmros [EMAIL PROTECTED] wrote: Hello everyone. I use double for loops to fill in matrices, but there are surely better (and computationally faster) ways to perform

Re: [R] Sweave does not parse \Sexpr{}

2008-03-19 Thread Max Kuhn
Have you used R2HTML lately? If so, please see the Sweave FAQ http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html#x1-18000A.16 Max On Wed, Mar 19, 2008 at 7:15 AM, Werner Wernersen [EMAIL PROTECTED] wrote: Sorry about the lack of detail. Some facts: - code chunks are processed fine -

[R] Using subset in correlation analysis

2008-03-19 Thread James J. Roper
The correlation test function says that it can do a subset where one specifies the subsete vector. I cannot seem to get it to work. For example, the command line is: cor.test(adults$Alt, adults$Cab, alternative=greater, method=pearson) So, let´s say my subset vector is Sex. How would I state

Re: [R] UNSOLITED E_MAILS: Integrate R data-analysis projects with Microsoft Office for free

2008-03-19 Thread ahimsa campos-arceiz
The guys didn't need to work very hard to obtain our data. (My understanding is that) all the mails from this list are publicly available at the R-help archives. You will find yourself here: http://tolstoy.newcastle.edu.au/R/e4/help/08/03/index.html That is why we can (and must) browse through

Re: [R] list()

2008-03-19 Thread Erik Iverson
Scott - Not sure about online references, I'm sure there are some. But any R book should have a complete discussion of lists. I learned from Modern Applied Statistics with S (MASS). Under the Books section of www.r-project.org, you'll find a comprehensive list of books dealing with R,

Re: [R] list()

2008-03-19 Thread John Kane
I cannot remember seeing any specific tutorial on the use of list(). There are bits and pieces here and there but outside of the little bit in the Intro to R I cannot think of any. For your specific question about names you can always assign (new) names to a list # Examples # No name aa -

Re: [R] Sweave does not parse \Sexpr{}

2008-03-19 Thread Werner Wernersen
I am not aware of that I have ever used R2HTML. However, your suggestion worked! Using Sweave(test.Rnw, syntax=SweaveSyntaxNoweb) does the trick and now the \Sexpr{} tags are being parsed again. Many, many thanks Max! All the best, Werner --- Max Kuhn [EMAIL PROTECTED] schrieb: Have you

[R] AERMOD in R?

2008-03-19 Thread Adrián Martínez Vargas
Dear List… There are pakages similar to AERMOD Modeling System* in R? *http://www.epa.gov/scram001/dispersion_prefrec.htm#aermod Best regards Dr. Adrian Martínez Vargas Revista Minería y Geología (Editor Principal) ISMM, Las Coloradas, s/n Moa, Holguín, Cuba CP. 83329

Re: [R] Partition data into clusters

2008-03-19 Thread John Kane
Can you supply a small self-contained example of this? --- Suhaila Zainudin [EMAIL PROTECTED] wrote: Greetings R-users, I have been using the fpc package in R to cluster my data. Speficically I am using kmeansruns clustering. I would like to know how I use R to partition data into

Re: [R] Using subset in correlation analysis

2008-03-19 Thread Mark Lyman
James J. Roper jjroper at gmail.com writes: The correlation test function says that it can do a subset where one specifies the subsete vector. I cannot seem to get it to work. For example, the command line is: cor.test(adults$Alt, adults$Cab, alternative=greater, method=pearson)

Re: [R] UNSOLITED E_MAILS: Integrate R data-analysis projects wi

2008-03-19 Thread Ted Harding
On 19-Mar-08 10:34:12, Rory Winston wrote: Me too. Getting directly spammed like this is really annoying. I dont mind a general post to the list, but individually spamming each member of the list is unacceptable. Especially as I have no interest in the stupid product in question. It's not

[R] How to remove double loop?

2008-03-19 Thread Jonas Malmros
Bill, Alberto, Gabor, Thank you for answering my question. Now I learned about outer() function. That was a straightforward example. But what if I had a matrix, where the last column was filled with values first (again, a for loop), and the rest was filled by using a double loop? OVal -

[R] Error en nlm(logdgenexpn, p = c(vmomest[[1]], vmomest[[2]]), x = x.genexp, : valor no finito provisto por 'nlm'

2008-03-19 Thread bernardo lagos alvarez
Dear useRs, I am analysing the behaviour of MLE for the two parameters of a kind of exponential distribution, leaving as initial values the estimators moments produced by the variation coefficient. I do using simulations, giving them an accountant, r. But running my codes remains a problem with

[R] plot with diffrent colour and plotting symbols

2008-03-19 Thread Diego Culattoni
Dear mailing list members, I am a new R user, I would like to plot the follewing data var1 - c(1,2,1,1,2,1,2,1,2,2) var2 - round(rgamma(10,2,1)/0.1)*0.1 var3 - c(0,1,0,1,0,0,0,0,1,0) var4 - c(1,2,2,2,1,1,1,1,1,1) Var - data.frame(var1,var2,var3,var4) Var - Var[sort(Var$var1),] tt -

Re: [R] ask for help how to get accumulate contingency table?

2008-03-19 Thread alex chin
I am still looking for an efficient way to get accumulated contingency table. Becasue it is huge data and permutate with covariate. it will be very slow if I use loops. Can somebody give me a help? Thanks. xj Date: Tue, 18 Mar 2008 10:43:27 -0400 From: [EMAIL PROTECTED] Subject: RE:

Re: [R] [PS] rmultinomial() function

2008-03-19 Thread Ben Fairbank
Mary -- The dmultinomial function (try ?Multinomial, noting that it is an upper case M) has a log option, which, if set to TRUE, returns logarithms of probabilities, but that is for computing probabilities, not generating samples. Perhaps the long you referred to is a misprint for log? In any

Re: [R] UNSOLITED E_MAILS: Integrate R data-analysis projects wi

2008-03-19 Thread Duncan Murdoch
On 3/19/2008 10:18 AM, (Ted Harding) wrote: On 19-Mar-08 10:34:12, Rory Winston wrote: Me too. Getting directly spammed like this is really annoying. I dont mind a general post to the list, but individually spamming each member of the list is unacceptable. Especially as I have no interest in

Re: [R] ls() and classes

2008-03-19 Thread David Winsemius
Rolf Turner [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: On 19/03/2008, at 4:39 PM, Erin Hodgess wrote: Dear R People: I want to get the class of all of the objects in my directory. Too easy!!! sapply(ls(),function(x){class(get(x))}) Thank you, Rolf. That supplied the

[R] Luis Miguel Delgado Gomez/BBK está ausente d e la oficina.

2008-03-19 Thread ldelgado
Estaré ausente de la oficina desde el 18/03/2008 y no volveré hasta el 31/03/2008. Responderé a su mensaje cuando regrese. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Cox Controlled Rounding Algorithm

2008-03-19 Thread Matthias Ganninger
Has anyone yet implemented or seen an implementation of a Cox (1987) controlled rounding algorithm in R? The controlled rounding procedure is described in: Cox, L.H. (1987): A Constructive Procedure for Unbiased Controlled Rounding. JASA, Vol. 82, No. 398, pp. 520-524. Kind regards Matthias

Re: [R] plot with diffrent colour and plotting symbols

2008-03-19 Thread Diego Culattoni
Thank you very much! What I would like to have at the end a cols - c(1,2,3,4), so cols = 1 if var3=0 and var4=1 cols = 2 and pchs=1 if var3=0 and var4=1 cols = 3 if var3=0 and var4=2 cols = 4 and pchs=1 if var3=0 and var4=2 Can this be down similarly? Thanks in advance, Diego -

Re: [R] R CMD SHLIB errors

2008-03-19 Thread sun
Thanks Prof. Brain, Following your suggestion I found the reason of my problem in the document ''R Installation and Administration' and the links it points to'. After I updated to R2.6.2, the RTools's default compiler chaged to gcc4 while I was using 3.4.x. The error disappeared after I

Re: [R] R CMD SHLIB errors

2008-03-19 Thread Benilton Carvalho
Brain indeed. On Mar 19, 2008, at 11:21 AM, sun wrote: Thanks Prof. Brain, Following your suggestion I found the reason of my problem in the document ''R Installation and Administration' and the links it points to'. After I updated to R2.6.2, the RTools's default compiler chaged to gcc4

Re: [R] running balance down a dataframe referring back to previous row

2008-03-19 Thread David Katz
Try: cs - with(txns,cumsum(cr - dr)) You could if needed adjust the starting value to zero by concatenating a zero in front and dropping the last entry. txns$running.bal - c(0,cs[seq(length(cs) - 1)]) Good luck. seanpor wrote: Good morning, I've searched high and low and I've tried many

Re: [R] adimpro package : R does not seem to find my ImageMagick installation

2008-03-19 Thread Prof Brian Ripley
On Wed, 19 Mar 2008, Olivier ETERRADOSSI wrote: Dear list, (sorry if I post to the wrong place...), Though having spent some time on it, I cannot find an answer by myself to the following behaviour of the read.image function (adimpro package) : I'm running R.2.6.2 on Windows XP. The home

[R] analyzing binomial data with spatially correlated errors

2008-03-19 Thread Jean-Baptiste Ferdy
Dear R users, I want to explain binomial data by a serie of fixed effects. My problem is that my binomial data are spatially correlated. Naively, I thought I could found something similar to gls to analyze such data. After some reading, I decided that lmer is probably to tool I need. The

[R] unsubscribe

2008-03-19 Thread ablukacz
Dear All, Can someone please give me instruction on how to unsubscribe from this list. I do not have the original emial that arrived with the subscription. Thank you, Agnes On Wed, 19 Mar 2008, Matthias Ganninger wrote: Has anyone yet implemented or seen an implementation of a Cox (1987)

Re: [R] unsubscribe

2008-03-19 Thread Gabor Csardi
What about reading the very last four lines of any email you get from the list? Like this one. G. On Wed, Mar 19, 2008 at 12:09:29PM -0400, ablukacz wrote: Dear All, Can someone please give me instruction on how to unsubscribe from this list. I do not have the original emial that arrived

Re: [R] R CMD SHLIB errors

2008-03-19 Thread sun
oops, forgive me for the typo. Benilton Carvalho [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] ROracle installation problem

2008-03-19 Thread rmail ye
Dear Prof. Ripley, I will follow your suggestion and send a follow-up message later on. Thanks, Sean On Tue, Mar 18, 2008 at 11:46 PM, Prof Brian Ripley [EMAIL PROTECTED] wrote: You need to manally configure this, *as it says*. In fact ROracle/inst/README.windows says For details on how

Re: [R] Using subset in correlation analysis

2008-03-19 Thread David Barron
You have to use the formula interface, so something like this: cor.test(~ Alt + Cab, data=adults, alternative=greater, subset=Sex==male) David On Wed, Mar 19, 2008 at 12:59 PM, James J. Roper [EMAIL PROTECTED] wrote: The correlation test function says that it can do a subset where one

Re: [R] adimpro package : R does not seem to find my ImageMagickinstallation

2008-03-19 Thread Olivier ETERRADOSSI
Thank you Professor, yes it is (unfortunately...), or at least it seems to be ;-) c:\program files\imagemagick-6.3.0-q16;C:\Program Files\MiKTeX 2.6\miktex\bin; ...8..(snip).. Regards, Olivier Prof Brian Ripley a écrit : On Wed, 19 Mar 2008, Olivier ETERRADOSSI wrote: Dear

[R] Fwd: betabinomial model

2008-03-19 Thread Zaihra T
--- the forwarded message follows --- ---BeginMessage--- Hi, can anyone help me fit betabinomial model to the following dataset where each iD is a cluster in itself , if i use package aod 's betabinom model it gives an estimate of zero to phi(the correlation coeficient ) and if

[R] betabinomial model

2008-03-19 Thread Zaihra T
Hi, can anyone help me fit betabinomial model to the following dataset where each iD is a cluster in itself , if i use package aod 's betabinom model it gives an estimate of zero to phi(the correlation coeficient ) and if i fix it to the anova type estimate obtained from icc( in

[R] Interaction Terms versus Interaction Effects in logistic regression

2008-03-19 Thread Paul Johnson
I would like to know more about the output from the terms option in predict(), especially for a glm. And especially when there is an interaction effect being considered. Here's why I ask. These articles were recently brought to my attention. They claim that just about everybody who has reported

Re: [R] [PS] rmultinomial() function

2008-03-19 Thread Mary Black
Thanks Ben and Eric. I've already tried rmultinom(), and there is a rmultinomial() function as well (which is in the multinomRob package). The rmultinomial() is supposed to be a random number generator for the multinomial distribution. There is an argument long which if set to TRUE or FALSE,

[R] one/multi-dimensional scaling with incomplete dissimilarity matrix

2008-03-19 Thread Loic Thibaut
Dear David, you asked this question a while ago on the R mailing list and got no answer. I have the same problem and was wondering if you had found a solution Cheers Loic Loic Thibaut, PhD candidate, ARC Centre of Excellence for Coral Reef Studies, School of Marine Biology, James Cook

[R] weibull model

2008-03-19 Thread boshao zhang
Dear Helpers: If you know how to fit a Weibull model using R, you are my savior for my project. The hazard ramda is specified as t^alpha * (1+a*dose*exp(-b*dose)). Or, can we modify the Cox model to capture the proportional part above? Here t is the survial time, dose is a subject received in a

Re: [R] two cols in a data frame are the same factor

2008-03-19 Thread Michael Dewey
At 09:11 18/03/2008, Andres Legarra wrote: Dear all, I have a data set (QTL detection) where I have two cols of factors in the data frame that correspond logically (in my model) to the same factor. In fact these are haplotype classes. Another real-life example would be family gas consumption as a

Re: [R] one/multi-dimensional scaling with incomplete dissimilarity matrix

2008-03-19 Thread Justin Donaldson
Have you tried Gower dissimilarity or Sammon mapping? Gower dissimilarity is in the cluster package, under the 'daisy' method. Sammon mapping is in the MASS package, under the sammon method. You may need to redo the dissimilarity matrix with Gower/daisy first, then Sammon. Keep in mind that

Re: [R] How to remove double loop?

2008-03-19 Thread davidr
Jonas, Take a look at CRRBinomialTreeOption{fOptions} in which Diethelm Wuertz uses a double loop, but of course, he's optimized it to use only a vector instead of a matrix! David L. Reiner, PhD Head Quant Rho Trading Securities, LLC -Original Message- From: [EMAIL PROTECTED]

[R] Anova of a nls object

2008-03-19 Thread Eric Ferreira
Dear useRs, How can I perform the analysis of variance of just one nls object? Regards -- Eric B Ferreira Exact Sciences Department Federal University of Lavras Minas Gerais - Brazil [[alternative HTML version deleted]] __

[R] Spearman and Pearson correlation coefficients.

2008-03-19 Thread Marcus Vinicius
Dear all, How do I do to estimate a Spearman and Pearson correlation coefficients on 1% (5%) significance level? Thanks a lot. Best Regards. Marcus Vinicius ps: I have one matrix (60 x 13). [[alternative HTML version deleted]] __

Re: [R] weibull model

2008-03-19 Thread anna freni sterrantino
the function survreg in the package survival should what are you looking for. Cheers Anna - Messaggio originale - Da: boshao zhang [EMAIL PROTECTED] A: r-help@r-project.org Inviato: Mercoledì 19 marzo 2008, 10:45:43 Oggetto: [R] weibull model Dear Helpers: If you know how to fit a

Re: [R] How to get the P-values from GLM results?

2008-03-19 Thread jebyrnes
I believe you're looking for summary. So my.glm-glm(Response ~ TrtA*TrtB) summary(my.glm) will give you p values for each parameter value. Similarly anova(my.glm) will give you p values for the likelihood ratio chi-square statistic for each factor using sequential tests. You can also use

Re: [R] plot with diffrent colour and plotting symbols

2008-03-19 Thread John Kane
?points Does this do what you wanted? - plot(tt, var2,xaxt =n, ylim=c(min(Var[1:3]), max(Var[1:3]))) axis(1,1:length(unique(var1)), labelname) points(tt, var3, col=green) points(tt,var4, col= red) ---

Re: [R] character strings and functions

2008-03-19 Thread Rolf Turner
On 19/03/2008, at 6:14 PM, Benilton Carvalho wrote: get(x1) Not quite the answer to the question that Erin posed. The right answer is get(x[1]) cheers, Rolf Turner On Mar 19, 2008, at 1:07 AM, Erin

Re: [R] AERMOD in R?

2008-03-19 Thread Don MacQueen
I rather doubt it, but since the source code appears to be available at the link you mentioned, one could no doubt create an R function that would run AERMOD. There would be numerous issues to work out, of course. -Don At 9:44 AM -0500 3/19/08, Adrián Martínez Vargas wrote: Dear List… There

Re: [R] How to remove double loop?

2008-03-19 Thread Ray Brownrigg
Read the posting guide (the bit about reproducible code): OVal - matrix(0, n+1, n+1) for(i in 0:n){ + OVal[i+1, n+1] - max(Val[i+1, n+1]-K, 0) + } Error: object Val not found for(i in seq(n,1, by=-1)){ + for(j in 0:(i-1)){ + OVal[j+1, i] - a*((1-p)*OVal[j+1, i+1]+p*OVal[j+2,

Re: [R] ls() and classes

2008-03-19 Thread Henrik Bengtsson
library(R.oo) example(data.frame) example(matrix) example(iris) ll() member data.class dimension objectSize 1 author character 1120 2 d data.frame c(10,3) 1136 3 d.0 data.framec(0,3)824 4 d0 data.frame c(10,0)320 5 d00

[R] Time Series Object

2008-03-19 Thread stephen sefick
I have a time series object that is made up of readings at 15 minutes for two years (this is why I am not posting data series). I have made this a time series with y = ts(x, frequency=96) ninety six is the number of 15minutes in a day. I want to smooth this series with k =

Re: [R] analyzing binomial data with spatially correlated errors

2008-03-19 Thread Ben Bolker
Jean-Baptiste Ferdy Jean-Baptiste.Ferdy at univ-montp2.fr writes: Dear R users, I want to explain binomial data by a serie of fixed effects. My problem is that my binomial data are spatially correlated. Naively, I thought I could found something similar to gls to analyze such data.

[R] Smoothing z-values according to their x, y positions

2008-03-19 Thread Emmanuel Levy
Dear All, I'm sure this is not the first time this question comes up but I couldn't find the keywords that would point me out to it - so apologies if this is a re-post. Basically I've got thousands of points, each depending on three variables: x, y, and z. if I do a plot(x,y, col=z), I get

[R] R GUI question

2008-03-19 Thread jeffreya
Hi. I'm looking to create a user-friendly program built around some R methods I've written. The program should be as easy to install and use as possible and will be built around a GUI. This program will be cross-platform; that's crucial. I'm familiar with Java and its GUI packages, I've been

Re: [R] R GUI question

2008-03-19 Thread Gabor Csardi
On Wed, Mar 19, 2008 at 12:56:13PM -0700, jeffreya wrote: Hi. I'm looking to create a user-friendly program built around some R methods I've written. The program should be as easy to install and use as possible and will be built around a GUI. This program will be cross-platform; that's

Re: [R] R GUI question

2008-03-19 Thread Richard M. Heiberger
Look at Rcmdr as the base for your additional menu functions. I am using it for my introductory courses and have added my own menu items. From CRAN, download and install Rcmdr and read it's documentation. Also from CRAN you can download and install my addin library RcmdrPlugin.HH The latter will

Re: [R] Smoothing z-values according to their x, y positions

2008-03-19 Thread Bert Gunter
There are dozens of functions within R and contributed packages that do this. The spatial statistics packages (see the spatial task view on CRAN) is certainly where most are concentrated, but thin plate splines (in splines packages, I believe), tensor product splines (in mgcv package), local

Re: [R] How to remove double loop?

2008-03-19 Thread Alberto Monteiro
Jonas Malmros wrote: But what if I had a matrix, where the last column was filled with values first (again, a for loop), and the rest was filled by using a double loop? Killing one of those loops is quite simple. The other may be harder. OVal - matrix(0, n+1, n+1) for(i in 0:n){

[R] problem with optim and integrate

2008-03-19 Thread kathie
Dear all, I want to min integrate( (p1*dnorm+p2*dnorm+p3*dnorm)^(1.3)) for p, mu, and sigma. So, I have to estimate 8 parameters(p3=1-p1-p2). Sometimes I got some results, but it was bad, sometimes, I got this warning-Error in integrate(numint, lower = -Inf, upper = Inf) : non-finite function

[R] Two Way ANOVA

2008-03-19 Thread David Mackovjak
First time using, the mailing list and I'm somewhat new to R, so excuse me if I do anything wrong. I was wondering how I would set up a two way ANOVA for the following data: Nitrogen (0) Nitrogen (20) (cell means)

Re: [R] Anova of a nls object

2008-03-19 Thread Bill.Venables
You don't, because the operation is not well defined. Using anova( ) on a single linear model object will fit a sequential sequence of sub-models got by adding the terms into the linear model, as they appear in the model formula, one by one. In non-linear regression there is no unique definition

Re: [R] betabinomial model

2008-03-19 Thread Bill.Venables
The package 'VGAM' (all caps) has a betabinomial model fitting facility in it. (I doubt this will save your soul, by the way, but it may save your butt. I think that is probably your most immediate concern, though.) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Re: [R] Two Way ANOVA

2008-03-19 Thread Daniel Malter
Hi, your post is hardly readable because it is so spread out over several pages. Can you repost it? Besides that I do not understand your question fully. The y is your dependent variable and as it looks the A*B would be Sulfur*Nitrogen if these are your variable names. You can also take a look

Re: [R] Smoothing z-values according to their x, y positions

2008-03-19 Thread Emmanuel Levy
Dear Bert, Thanks for your reply - I indeed saw a lot of functions using: help.search(smooth) The problem is that most seem to not be very appropriate to what I'd like, or they seem extremely complicated (e.g. gma). I am probably missing something as I don't see how to use Loess. From my poor

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread David Mackovjak
Ben, I would like to test the sulfur on the clover field, nitrogen on the clover field and then test for the presence of interaction. Sorry about the last email, seems it really screwed itself over, here it is again, hopefully nicer: Nitrogen(0) Nitrogen(20)

[R] Multiple plots question

2008-03-19 Thread Andre Nathan
Hello I have a number of different data sets, each loaded as a matrix. I'd like to plot them in a way that the data in the first column of each matrix is plotted on the same pair of axes. What I'm doing now is to call plot() for the data on the first matrix, then call points() for the other

  1   2   >