Re: [R] AICc vs AIC for model selection

2006-07-15 Thread Kjetil Brinchmann Halvorsen
Spencer Graves wrote: Regarding AIC.c, have you tried RSiteSearch(AICc) and RSiteSearch(AIC.c)? This produced several comments that looked to me like they might help answer your question. Beyond that, I've never heard of the forecast package, and I got zero hits for

[R] combinatorial programming problem

2006-05-26 Thread Kjetil Brinchmann Halvorsen
Hola! I am programming a class (S3) symarray for storing the results of functions symmetric in its k arguments. Intended use is for association indices for more than two variables, for instance coresistivity against antibiotics. There is one programming problem I haven't solved, making an

Re: [R] access list component names with lapply

2006-04-19 Thread Kjetil Brinchmann Halvorsen
Thomas Girke wrote: I have a question regarding accessing the names of list components when applying a function with lapply. Here is an example that demonstrates what I'd like to do. I have a list like this one: mylist - list(a=letters[1:10], b=letters[10:1], c=letters[1:3])

Re: [R] Intercepts in linear models.

2006-03-23 Thread Kjetil Brinchmann Halvorsen
Rolf Turner wrote: A colleague asked me if there is a way to specify with a ***variable*** (say ``cflag'') whether there is an intercept in a linear model. She had in mind something like lm(y ~ x - cflag) something like lm( if (cflag) y ~ x-0 else y ~ x, ... Kjetil where cflag

Re: [R] Classifying time series by shape over time

2006-03-21 Thread Kjetil Brinchmann Halvorsen
Andreas Neumann wrote: Dear all, I have hundreds of thousands of univariate time series of the form: character seriesid, vector of Date, vector of integer (some exemplary data is at the end of the mail) I am trying to find the ones which somehow have a shape over time that looks like the

Re: [R] reading in only one column from text file

2006-03-07 Thread Kjetil Brinchmann Halvorsen
mark salsburg wrote: How do I manipulate the read.table function to read in only the 2nd column??? Se the colClasses argument of read.table() Kjetil [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] what is scale function? Is it for variable transformation?

2006-03-05 Thread Kjetil Brinchmann Halvorsen
Kum-Hoe Hwang wrote: HOwdy I read R books about scale function for variable transformation. Acoording to this book scale function leads me to better regression results. Or am I worng? I hope somebody tell me about a scale function? Is it for variable transformation? Did you try to read

Re: [R] error function

2006-03-05 Thread Kjetil Brinchmann Halvorsen
Nongluck Klibbua wrote: hi all, Does anyone know which command to use for error function(erf)? Thanks __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] Npmc for doing post-hoc after Kruskal

2006-03-04 Thread Kjetil Brinchmann Halvorsen
Farrel Buchinsky wrote: I followed the threads that enquired about doing post-hoc tests after doing Kruskal testing. It took me to npmc. But npmc is giving an output I do not understand. I noticed a thread entitled npmc function: 'x' must be atomic but there never appeared to be a

Re: [R] CCF and Lag questions

2006-03-02 Thread Kjetil Brinchmann Halvorsen
Pallavi Naresh wrote: I am new to R and new to time series modeling. I have a set of variables (var1, var2, var3, var4, var5) for which I have historical yearly data. I am trying to use this data to produce a prediction of var1, 3 years into the future. I have a few basic questions:

Re: [R] Increase Decimal Accuracy?

2006-03-02 Thread Kjetil Brinchmann Halvorsen
Ann Hess wrote: Is there any way to increase the decimal accuracy for probability distributions. For example (in R): 1-pchisq(90,5) [1] 0 But in Maple, I find that the value is 0.67193x10-17. Look at this: 1-pchisq(90,5) [1] 0 pchisq(90,5, lower=FALSE) [1] 6.71932e-18 Kjetil

Re: [R] linear lists, creation, insertion, deletion, traversal *someone?*

2006-03-01 Thread Kjetil Brinchmann Halvorsen
Christian Hoffmann wrote: Hi, In a second try I will ask this list to give me some useful pointers. Linear lists, as described e.g. by N.Wirth in Algorithms and Data Structures, seem not to be implemented in S/R, although in lisp we have cons, car, cdr. This has been discussed on the

Re: [R] How to do a proc summary in R?

2006-03-01 Thread Kjetil Brinchmann Halvorsen
Emilie Berthiaume wrote: Hi, I'm a SAS user trying to convert myself to R but I still have problems with some pretty simple commands. First I wanted to add up a number of red-tailed hawks seen per day ( julian day) per year. So I tried: RTyrday - tapply(RThr,list(year,julian),sum)

Re: [R] Compute a correlation matrix from an existing covariance matrix

2006-02-21 Thread Kjetil Brinchmann Halvorsen
Marc Bernard wrote: Dear All, I am wondering if there is an R function to convert a covariance matrix to a correlation matrix. I have a covariance matrix sigma and I want to compute the corresponding correlation matrix R from sigma. Does cov2cor do what you want? Kjetil

Re: [R] How to get around heteroscedasticity with non-linear least squares in R?

2006-02-21 Thread Kjetil Brinchmann Halvorsen
Quin Wills wrote: I am using nls to fit dose-response curves but am not sure how to approach more robust regression in R to get around the problem of the my error showing increased variance with increasing dose. package sfsmisc has rnls (robust nls) which might be of use. Kjetil

Re: [R] How to read more than 1 table?

2006-02-20 Thread Kjetil Brinchmann Halvorsen
Atte Tenkanen wrote: Question 1) I want to read many csv-tables and run the same commands for all of them. Is there some simpler solution than this below to solve this problem? for (g in 1:6) { if (g==1){k=kt1_0057} if (g==2){k=kt1_0101} if (g==3){k=kt1_0613} if (g==4){k=staten} if

Re: [R] function for prediting garch

2006-02-17 Thread Kjetil Brinchmann Halvorsen
oliver wee wrote: hello, In my time series data, I was able to successfully fit its ARIMA model (Box-Jenkins) and its GARCH model and estimate their parameters. I was also able to forecast future values of the time series based on my fitted ARIMA model using the predict() function call.

Re: [R] read.table

2006-02-14 Thread Kjetil Brinchmann Halvorsen
Diethelm Wuertz wrote: Thanks a lot that works fine! Next problem, if I would have my own package, and the file test.csv would be located in the data directory How to use the function data to get data(test) Also put in the data subdirectory the file test.R with the commands to read

Re: [R] how I can perform Multivariate Garch analysis in R

2006-02-14 Thread Kjetil Brinchmann Halvorsen
Arun Kumar Saha wrote: Dear aDVISOR, Hope I am not disturbing you. Can you tell me how I can perform Multivariate Garch analysis in R. Also please, it is my humble request let me know some resource materials on Multivariate Garch analysis itself. You could tryhelp.search(garch) or

Re: [R] LCA in e1071

2006-02-13 Thread Kjetil Brinchmann Halvorsen
Lisa Wang wrote: Hello there, In the e1071 package,'lca' function only works for binary data for Latent class analysis. Am I right? I would like to test the agreement amongst 6 raters for nominal data ona scale from 1-4, and conduct a latent class analysis. What package package irr (on

Re: [R] R: mean from list

2006-02-12 Thread Kjetil Brinchmann Halvorsen
[EMAIL PROTECTED] wrote: great!! thanks very much, mean(unlist(lapply(listdata, function(z) z$c))) WHY unlist(lapply(... when sapply(... is simpler? Kjetil works well. and what about getting the average table $a (displaying the average elements across all 1000 matrix)? could you please

Re: [R] putting text in the corner

2006-02-09 Thread Kjetil Brinchmann Halvorsen
Fernando Mayer wrote: You can get the x and y position of any place of an open graphic device with the mouse cursor, using the function locator(), and even assing this values to an object, as in: xy-locator() You will have a list with x and y positions. Then you can use:

Re: [R] New user: Custom probability distribution

2006-02-09 Thread Kjetil Brinchmann Halvorsen
Jan Danielsson wrote: Hello, Given a probability function: p(x) = 12 / (25(x+1)) , x=0, 1, 2, 3 we generate the following values: C1 C2 0 0.48 1 0.24 2 0.16 3 0.12 Now, I'm supposed to create 50 random values using this table. In MiniTab, I simply selected

Re: [R] rob var/cov + LAD regression

2006-02-08 Thread Kjetil Brinchmann Halvorsen
Angelo Secchi wrote: Hi, after looking around I was not able to get info about these two questions: 1. Is there a function to have a jackknifed corrected var/cov estimate (as described in MacKinnon and White 1985) in a standard OLS regression? Not sure, but look at package sandwich

Re: [R] power and sample size for a GLM with poisson response variable

2006-02-06 Thread Kjetil Brinchmann Halvorsen
Craig A Faulhaber wrote: Hi all, I would like to estimate power and necessary sample size for a GLM with a response variable that has a poisson distribution. Do you have any suggestions for how I can do this in R? Thank you for your help. Sincerely, Craig package asypow (on CRAN)

Re: [R] can I do this with read.table??

2006-01-26 Thread Kjetil Brinchmann Halvorsen
Douglas Grove wrote: Hi, I'm trying to figure out if there's an automated way to get read.table to read in my data and *not* convert the character columns into anything, just leave them alone. What I'm referring ?Did you read the help page? What about argument as.is=TRUE? See also argument

Re: [R] R vs. Excel (R-squared)

2006-01-25 Thread Kjetil Brinchmann Halvorsen
Cleber N. Borges wrote: I was quite interested in this thread (discussion), once that I am chemistry student and I work with Mixtures Designs that are models without intercept. I thought quite attention the follow afirmation: ' Thus SST, the corrected total sum of squares, should be

Re: [R] finding index of maximum value in vector

2005-12-18 Thread Kjetil Brinchmann Halvorsen
Jean-Luc Fontaine wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I found: max.col(matrix(c(1,3,2),nrow=1)) Is there a more concise/elegant way? which.max Thanks, - -- Jean-Luc Fontaine http://jfontain.free.fr/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux)

Re: [R] Age of an object?

2005-12-14 Thread Kjetil Brinchmann Halvorsen
Philippe Grosjean wrote: Martin Maechler wrote: Trevor == Trevor Hastie [EMAIL PROTECTED] on Tue, 13 Dec 2005 12:51:34 -0800 writes: Trevor It would be nice to have a date stamp on an object. One way to do this with important objects is to use the comment function (in package base)

Re: [R] Age of an object?

2005-12-14 Thread Kjetil Brinchmann Halvorsen
Philippe Grosjean wrote: Martin Maechler wrote: Trevor == Trevor Hastie [EMAIL PROTECTED] on Tue, 13 Dec 2005 12:51:34 -0800 writes: Trevor It would be nice to have a date stamp on an object. Following up on my post of a few minutes ago, I tried to write an timestamp function

Re: [R] Polytopic Vector Analysis (PVA)

2005-12-13 Thread Kjetil Brinchmann Halvorsen
Melanie Edwards wrote: I am curious whether anybody has or is developing this capability within R. I have not found any software yet that has this capability and I am not sure whether it is too new a method and nobody is actually using it, googling around I found that this (PVA) is a variant

Re: [R] Generation of missiing values in a time serie...

2005-12-13 Thread Kjetil Brinchmann Halvorsen
Gabor Grothendieck wrote: Yes, this is the definition of a time series and therefore of a zoo object. A time series is a mathematical function, i.e. it assigns a single element of the range to each element of the domain. This data does not describe a time series. Since nobody else has

Re: [R] store and retrieve object names in a vector

2005-12-12 Thread Kjetil Brinchmann Halvorsen
zhihua li wrote: hi netters, suppose i have a series of objects X1, X2, B1,C1... they all have the same dimensions. i want to combine into one by using cbind: y-cbind(X1,X2,B1,C1.) but i don't want to type the names of these objects one by one. instead, i've put their names

Re: [R] Help: chisq.test

2005-12-10 Thread Kjetil Brinchmann Halvorsen
Thanjavur Bragadeesh wrote: I have two groups of patients (improved or not improved) named x and y group respectively after being treated with 5 different drugs X-c(43,52,25,48,57) and Y-c(237,198,245,212,233) when I run chisq.test(cbind(x,y)) This takes cbind(X,Y) as a

Re: [R] Broken links on CRAN

2005-12-05 Thread Kjetil Brinchmann Halvorsen
Doran, Harold wrote: Sorry, didn't think about that. The mirror I used was http://lib.stat.cmu.edu/R/CRAN/ I just tried what you did, but with firefox, and there were no problems. Kjetil I checked other mirrors and they did work fine. -Original Message- From: [EMAIL

Re: [R] plotting question

2005-12-05 Thread Kjetil Brinchmann Halvorsen
Ed Wang wrote: Yes, I have gone through the manual. My best reference for plotting has been examples either through the list archive or searches on the internet. Nothing in the introductory manual could get me to what I have been able to do so far, but that is limited to plotting componenets

Re: [R] squared coherency and cross-spectrum

2005-12-05 Thread Kjetil Brinchmann Halvorsen
Spencer Graves wrote: I haven't seen a reply, so I will comment even though I've never used coherency / coherence nor spectrum. RSiteSearch(coherence) produced 13 hits, the third of which looked like it might be relevant to your question

Re: [R] Impaired boxplot functionality - mean instead of median

2005-12-01 Thread Kjetil Brinchmann Halvorsen
P Ehlers wrote: I'd like to add two comments to Martin's sensible response. 1. I've seen several intro-stats textbooks that define a boxplot to have whiskers to the extreme data values and then define Tukey's boxplot as a modified boxplot. I wish authors wouldn't do that. 2. I've also

Re: [R] help with R

2005-12-01 Thread Kjetil Brinchmann Halvorsen
Ed Wang wrote: Morning, I've downloaded the precompiled R 2.1.1 version and am using Windows XP on my office workstation. As mentioned previously, I've resorted to batch jobs to avoid the hanging that occurs when I try to plot the 3690 length vector of data. If it's warranted, I can do a

[R] Question on KalmanSmooth

2005-11-28 Thread Kjetil Brinchmann Halvorsen
I am trying to use KalmanSmooth to smooth a time series fitted by arima (and with missing values), but the $smooth component of the output baffles me. Look at the following example: testts - arima.sim(list(ar=0.9),n=100) testts[6:14] - NA testmod - arima(testts, c(1,0,0)) testsmooth -

Re: [R] coherency-Time Series

2005-11-27 Thread Kjetil Brinchmann Halvorsen
[EMAIL PROTECTED] wrote: hello! My name is Stefanos, from Athens. I'm a new user of R and I'm studying multivariate time series. I can't find in the help menu how to calculate the cross spectrum and the coherency of 2 Time Series. Would you like to help me? Thanks

Re: [R] multilevel models and sample size

2005-11-27 Thread Kjetil Brinchmann Halvorsen
ronggui wrote: It is not a pure R question,but I hope some one can give me advices. I want to use analysis my data with the multilevel model.The data has 2 levels the second level has 52 units and each second level unit has 19-23 units.I think the sample size is quite small,but just

Re: [R] 'For each file in folder F do....'

2005-11-27 Thread Kjetil Brinchmann Halvorsen
Ron Piccinini wrote: Hello, I have 2700 text files in a folder and need to apply the same program/procedure to each individually. I'm trying to find how to code something like: For each file in Folder do {Procedure} is there an easy way to do this? other suggestions? files -

Re: [R] R: pp plot

2005-11-24 Thread Kjetil Brinchmann Halvorsen
Dr. Herwig Meschke wrote: To construct a nonparametric (1-alpha) confidence set for an arbitrary CDF F, you can use the Dvoretzky-Kiefer-Wolfowitz (DKW) inequality (e.g., see Wasserman, L. (2005). All of Statistics. 2nd, corr. printing. NY: Springer, p. 99). With n=sample size and

Re: [R] Can't figure out warning message

2005-11-21 Thread Kjetil Brinchmann Halvorsen
Ravi Varadhan wrote: Hi, I apologize for the previous posting, where the message was not formatted properly. Here is a better version: I have written the following function to check whether a vector has elements satisfying monotonicity. is.monotone - function(vec,

[R] Use of paste with apply()

2005-11-06 Thread Kjetil Brinchmann halvorsen
I was surprised by: test - matrix( as.character(1:4), 2) test [,1] [,2] [1,] 1 3 [2,] 2 4 apply(test, 1, paste, sep=+) [,1] [,2] [1,] 1 2 [2,] 3 4 apply(test, 1, paste, sep=*) [,1] [,2] [1,] 1 2 [2,] 3 4 te - matrix(1:4, 2) te [,1] [,2] [1,]13

Re: [R] OLS variables

2005-11-06 Thread Kjetil Brinchmann halvorsen
John Fox wrote: Dear Leaf, I assume that you're using lm() to fit the model, and that you don't really want *all* of the interactions among 20 predictors: You'd need quite a lot of data to fit a model with 2^20 terms in it, and might have trouble interpreting the results. If you know

Re: [R] FDR analyses: minimum number of features

2005-09-22 Thread Kjetil Brinchmann Halvorsen
Spencer Graves wrote: Two thoughts on this: 1. Your FDR (Not Franklin Delano Roosevelt) sounds like another name for Type I error rate. It is certainly not the same as type I error rate. Type I error rate is the proportion of true nulls which are rejected, while the FDR is

Re: [R] significance of spectal peak with spectrum()

2005-09-16 Thread Kjetil Brinchmann Halvorsen
Sebastian Leuzinger wrote: thanks a lot. I am interested in the more complex case where the interest is about a specific frequency being significant, not at least one frequency being significantly different from the backgrond white noise. I have discussed this issue with very knowledgable

Re: [R] Multivariate Skew Normal distribution

2005-09-02 Thread Kjetil Brinchmann Halvorsen
(Ted Harding) wrote: On 01-Sep-05 Caio Lucidius Naberezny Azevedo wrote: Hi all, Could anyone tell me if there is any package (or function) that generates values from a multivariate skew normal distribution? Thanks all, Caio Hello, Caio Please tell us what you mean by skew

Re: [R] coercing created variables into a new data frame using na.omit()

2005-08-12 Thread Kjetil Brinchmann Halvorsen
Prof Brian Ripley wrote: I don't know if you can read your message, but I find it exceedingly difficult and there seem to be several typos. Please use the space and return keys ... and only send a message once. You problem is perhaps that you are not looking at the data frame, but at the

Re: [R] computationally singular

2005-08-10 Thread Kjetil Brinchmann Halvorsen
Weiwei Shi wrote: I think the problem might be caused two variables are very correlated. Should I check the cov matrix and try to delete some? But i am just not quite sure of your reply. Could you detail it with some steps? thanks, Why not do principal component analysis? To identify the

Re: [R] use of NA's

2005-08-06 Thread Kjetil Brinchmann Halvorsen
Robert Kinley wrote: with NAs it's always safest to use the construction if(is.na(foo)) rather than if(foo==NA) cheers Bob Kinley And if it is not clear why, try: NA == NA [1] NA Kjetil tom wright [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 05/08/2005 12:30 To

Re: [R] Binary outcome with non-absorbing outcome state

2005-07-29 Thread Kjetil Brinchmann Halvorsen
John Sorkin wrote: I am trying to model data in which subjects are followed through time to determine if they fall, or do not fall. Some of the subjects fall once, some fall several times. Follow-up time varies from subject to subject. I know how to model time to the first fall (e.g. Cox

Re: [R] comparing strength of association instead of strength of evidence?

2005-07-10 Thread Kjetil Brinchmann Halvorsen
selection in text categorization might be a good ref.). Anyone here has other suggestions? thanks, weiwei On 6/24/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 6/24/05, Kjetil Brinchmann Halvorsen [EMAIL PROTECTED] wrote: Weiwei Shi wrote: Hi, I asked this question before

Re: [R] What method I should to use for these data?

2005-07-07 Thread Kjetil Brinchmann Halvorsen
luan_sheng wrote: -Original Message- From: luan_sheng [mailto:[EMAIL PROTECTED] Sent: Thursday, July 07, 2005 9:46 PM To: (r-help@stat.math.ethz.ch) Cc: ([EMAIL PROTECTED]) Subject: What method I should to use for these data? Dear R user: I am studying the allele data of two

Re: [R] rlm/M/MM-estimator questions

2005-07-06 Thread Kjetil Brinchmann Halvorsen
Christian Hennig wrote: Hi list, 1) How can the MM-estimator method=MM in function rlm be tuned to 85% efficiency? It seems that there is a default tuning to 95%. I presume, but am not sure, that the MM-estimator uses phi=phi.bisquare as default and the tuning constant could be set by adding a

Re: [R] comparing strength of association instead of strength of evidence?

2005-06-24 Thread Kjetil Brinchmann Halvorsen
Weiwei Shi wrote: Hi, I asked this question before, which was hidden in a bunch of questions. I repharse it here and hope I can get some help this time: I have 2 contingency tables which have the same group variable Y. I want to compare the strength of association between X1/Y and X2/Y. I am not

Re: [R] chisq test and fisher exact test

2005-06-22 Thread Kjetil Brinchmann Halvorsen
Weiwei Shi wrote: Hi, I have a text mining project and currently I am working on feature generation/selection part. My plan is selecting a set of words or word combinations which have better discriminant capability than other words in telling the group id's (2 classes in this case) for a dataset

Re: [R] glm with variance = mu+theta*mu^2?

2005-06-11 Thread Kjetil Brinchmann Halvorsen
Spencer Graves wrote: How might you fit a generalized linear model (glm) with variance = mu+theta*mu^2 (where mu = mean of the exponential family random variable and theta is a parameter to be estimated)? This appears in Table 2.7 of Fahrmeir and Tutz (2001) Multivariate

Re: [R] Replacing for loop with tapply!?

2005-06-10 Thread Kjetil Brinchmann Halvorsen
Sander Oom wrote: Dear all, We have a large data set with temperature data for weather stations across the globe (15000 stations). For each station, we need to calculate the number of days a certain temperature is exceeded. So far we used the following S code, where mat88 is a matrix

Re: [R] Random seed problem in MCMC coupling of chains

2005-06-08 Thread Kjetil Brinchmann Halvorsen
Gorjanc Gregor wrote: Thanks to Paul and Gabor for additional tips/examples. Actually, I find Pauls suggestion with setRNG also nice and is exactly what I wanted. Paul, if I understand this correctly, your suggestion with setRNG does not alter RNG flow, it just takes care that chains really

Re: [R] R and MLE

2005-06-07 Thread Kjetil Brinchmann Halvorsen
Ajay Narottam Shah wrote: I learned R MLE in the last few days. It is great! I wrote up my explorations as http://www.mayin.org/ajayshah/KB/R/mle/mle.html I will be most happy if R gurus will look at this and comment on how it can be improved. I have a few specific questions: * Should

Re: [R] function and apply

2005-06-05 Thread Kjetil Brinchmann Halvorsen
jose silva wrote: Dear all Its very difficult to read your post due to all the blank lines, so I cannot really read it very well, but what about writing your function as (not tried) fun - function(x) c(x[1], or if that doesn't work look into ?mapply But you should really look into

Re: [R] geometric mean regression

2005-06-03 Thread Kjetil Brinchmann Halvorsen
Poizot Emmanuel wrote: Hi, is it possible to perform a geometric mean regression with R ? Thanks. As has been said on this list before, This is R, there is no if, only how, but if you actually wanted to ask how it is possible, it would help if you explained what is geometric mean

Re: [R] Dynamic Dictionary Data Type?

2005-06-02 Thread Kjetil Brinchmann Halvorsen
Prof Brian Ripley wrote: On Thu, 2 Jun 2005, hadley wickham wrote: An environment is a hash table, and copying occurs only on modification, when any language would have to copy in this context. Caveat: the default is new.env(hash=FALSE), so an environment is a hash table in one sense

Re: [R] Dynamic Dictionary Data Type?

2005-06-02 Thread Kjetil Brinchmann Halvorsen
Duncan Murdoch wrote: Gabor Grothendieck wrote: On 6/2/05, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Thu, 2 Jun 2005, hadley wickham wrote: An environment is a hash table, and copying occurs only on modification, when any language would have to copy in this context. Caveat: the

[R] Incompatibility with VGAM

2005-05-29 Thread Kjetil Brinchmann Halvorsen
I just discovered that when the VGAM package (not on CRAN) is loaded, glm() doesn't work. This is because VGAM defines a family function() which gets found by glm() in place of the family function from stats. Then VGAM:::family returns an object which doesn't have a $family component, (it has

Re: [R] how to make legends on histograms

2005-05-28 Thread Kjetil Brinchmann Halvorsen
Andreas Zankl wrote: I have a histogram with histograms for several datasets superimposed. How can I add a legend that indicates which dataset uses which linetype? Thanks Andreas ?legend ?locator -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction.

Re: [R] comparing glm models - lower AIC but insignificant coefficients

2005-05-23 Thread Kjetil Brinchmann Halvorsen
Constantinos Antoniou wrote: Hello, I am a new R user and I am trying to estimate some generalized linear models (glm). I am trying to compare a model with a gaussian distribution and an identity link function, and a poisson model with a log link function. My problem is that while the

Re: [R] Suppressing warning messages

2005-05-15 Thread Kjetil Brinchmann Halvorsen
Tolga Uzuner wrote: How do I suppress the following ? Warning messages: 1: the condition has length 1 and only the first element will be used in: if (strike == forward) atmvol(forward, t, alpha, beta, rho, upsilon) else { 2: the condition has length 1 and only the first element will be used in:

Re: [R] eigenvalues of a circulant matrix

2005-05-03 Thread Kjetil Brinchmann Halvorsen
Globe Trotter wrote: Good point: the Bellman reference is a book: Introduction to Matrix Analysis by Bellman (1960). McGraw-Hill Series in Matrix Theory. --- and republished much later by SIAM. Kjetil --- Robin Hankin [EMAIL PROTECTED] wrote: Hi everyone. The following webpage gives a

Re: [R] How to prove R as good (Was: (no subject))

2005-05-03 Thread Kjetil Brinchmann Halvorsen
rene.raupp wrote: Does anybory knows any work comparing R with other (charged) statistical softwares (like Minitab, SPSS, SAS)? I work in a brasilian government bureau and I intend to use R as our preferable statistical software, but I have to show it's as good as the others. Sorry. That will be

Re: [R] Roots of quadratic system.

2005-05-01 Thread Kjetil Brinchmann Halvorsen
John Janmaat wrote: Hello, I have a system of quadratic equations (results of a Hamiltonian optimization) which I need to find the roots for. Is there a package and/or function which will find the roots for a quadratic system? Certainly you cxould use solve, see ?solve Alternatively you could

[R] Warning from Rcmd check - data could not find data set

2005-04-29 Thread Kjetil Brinchmann Halvorsen
This is rw2010 from CRAN. When running Rcmd check on a package I get: Warning in utils::data(list = al, envir = data_env) : data set 'vowel.test' not found Warning in utils::data(list = al, envir = data_env) : data set 'vowel.train' not found Warning in utils::data(list = al, envir =

Re: [R] can test the if relationship is significant in cancor?

2005-04-16 Thread Kjetil Brinchmann Halvorsen
ronggui wrote: i have try hard to find the answer by google,but i can not find any solution. so i wan to ask: 1,can we test the if canonical relationship is significant after using cancor? One reference is T. W. Anderson: An Introduction to Multivariate Statistical Analysis, second edition,

Re: [R] Data set for loglinear analysis

2005-04-04 Thread Kjetil Brinchmann Halvorsen
Warfield Jr., Joseph D. wrote: Dear users I need to perform a loglinear analysis of a real data set for a course project. I need a real data set with contingency tables in at least 3 dimensional, each with more than 2 levels. Thanks Joe Warfield [[alternative HTML version deleted]]

Re: [R] custom loss function + nonlinear models

2005-04-04 Thread Kjetil Brinchmann Halvorsen
Christian Mora wrote: Hi all; I'm trying to fit a reparameterization of the assymptotic regression model as that shown in Ratkowsky (1990) page 96. Y~y1+(((y2-y1)*(1-((y2-y3)/(y3-y1))^(2*(X-x1)/(x2-x1/(1-((y2-y3)/(y3-y1))^2)) where y1,y2,y3 are expected-values for X=x1, X=x2, and

Re: [R] 'skewing' a normal random variable

2005-04-03 Thread Kjetil Brinchmann Halvorsen
Ashraf Chaudhary wrote: Hi All; The following question is directed more to statisticians on the list. Suppose I have a normal random variable. Is there a transformation that I can apply so that the new variable is slightly positively skewed. I greatly appreciate your help. Ashraf

Re: [R] Where can I found the package ordinal ?

2005-03-27 Thread Kjetil Brinchmann Halvorsen
Peter Dalgaard wrote: ¢é ¨ [EMAIL PROTECTED] writes: Hello,dear all: I want to install the package ordinal,but I don't see the package listed under package sources. I try to search it by google,then I found this: http://euridice.tue.nl/~plindsey/rlibs.html but the connect does not work.

Re: [R] Bivariate lognormal distribution

2005-03-26 Thread Kjetil Brinchmann Halvorsen
Vicky Landsman wrote: Thanks to Prof. Ripley, Kjetil and Spencer Graves for help. I will be more specific. I have to simulate a bivariate lognormal pair (Y1,Y0) where E(Y1)=X'b, E(Y0)=X'd, Var(Y1)=c1, Var(Y0)=c0, X is a data matrix, and b and d are vectors of parameters. Vicky. You did'nt specify

Re: [R] mixtures as outcome variables

2005-03-24 Thread Kjetil Brinchmann Halvorsen
Kjetil Brinchmann Halvorsen wrote: Jason W. Martinez wrote: Dear R-users, I have an outcome variable and I'm unsure about how to treat it. Any advice? If you only concentrate on the relative proportions, this are called compositional data. I f your data are in mydata (n x 4), you obtain

Re: [R] Bivariate lognormal distribution

2005-03-24 Thread Kjetil Brinchmann Halvorsen
Vicky Landsman wrote: Dear experts! Is there a package that enables to create the bivariate log-normal variables? What do you mean by create? If you mean simulate, why not use mvrnorm from MASS, and then exponentiate? Kjetil Thanks a lot, Vicky Landsman. [[alternative HTML version

Re: [R] mixtures as outcome variables

2005-03-23 Thread Kjetil Brinchmann Halvorsen
Jason W. Martinez wrote: Dear R-users, I have an outcome variable and I'm unsure about how to treat it. Any advice? I have spending data for each county in the state of California (N=58). Each county has been allocated money to spend on any one of the following four categories: A, B, C, and D.

Re: [R] Question on statistics

2005-03-23 Thread Kjetil Brinchmann Halvorsen
Roy Werkman wrote: Yes, it is discrete, but the underlying distribution is Gaussian. / I guess you mean what somebody calls the superpopulation distribution. Kjetil / Just got the following from a college: Var(mean of finite population) = ((N - n)/(N - 1)) * var(population) / n This should be

Re: [R] Generating Interaction Factors (combinations of Data Frame columns)

2005-03-21 Thread Kjetil Brinchmann Halvorsen
Thomas Hopper wrote: I'm starting to do a fair amount of DOE in my day job and need to generate full- and fractional-factorial designs. One of the things I'd like to do is generate all possible interaction effects, given the main effects. I've been searching through the documentation, packages

Re: [R] Hazard function or cumulative Hazard function in R

2005-03-21 Thread Kjetil Brinchmann Halvorsen
yassir rabhi wrote: Hi, I'm student from canada, and i'work in survival analysis.I want to know if there is a hazard function or cumulative hazard function in R or not, i know how to program it, but it is easy to use it if they exists in R. Thanks.

Re: [R] Basic questions about RMySQL

2005-03-18 Thread Kjetil Brinchmann Halvorsen
De la Vega Góngora Jorge wrote: Hello, Please forget me if I am asking something that is well documented. I have read documentation but there are points that are not clear for me. I am not expert in R nor Databases, but if someone direct me to a tutorial, I will appreciate it.. 1. In my

Re: leap years (Was: [R] lm and time series)

2005-03-04 Thread Kjetil Brinchmann Halvorsen
A followup: How do people treat dsaily time series, when there is a yearly cycle? For the moment I just left out the 29 of February's, but that dsoes'nt look really good. Is the only way to include them to use irregular time series? Kjetil Gabor Grothendieck wrote: From: Matthieu Cornec [EMAIL

Re: [R] Rconsole wishlist

2005-03-03 Thread Kjetil Brinchmann Halvorsen
Duncan Mackay wrote: Sorry, yes, Rgui under WinXP (SP2). But while Windows date stamps the history file file.info(.Rhistory) size isdir mode mtime ctime .Rhistory 5377 FALSE 666 2005-03-04 10:37:52 2005-03-04 10:37:52 atime

Re: [R] draw random samples from empirical distribution

2005-03-01 Thread Kjetil Brinchmann Halvorsen
bogdan romocea wrote: Dear useRs, I have an empirical distribution (not normal etc) and I want to draw random samples from it. One solution I can think of is to compute let's say 100 quantiles, then use runif() to draw a random number Q between 1 and 100, and finally run runif() again to pull a

Re: [R] Bayesian stepwise

2005-02-24 Thread Kjetil Brinchmann Halvorsen
Spencer Graves wrote: Does anyone know of research fully Bayesian stepwise procedures assuming that models not considered by the stepwise would essentially have zero posterior probability? I need to analyze the results of ad hoc experiments run in manufacturing with crazy confounding

Re: [R] Warnings by functions mean(), median()

2005-02-19 Thread Kjetil Brinchmann Halvorsen
[EMAIL PROTECTED] wrote: Hello, following functions doesnt work correct with my data: median(), geo.mean(). My datafiles contain more than 10.000 lines and six columns from a flow-cytometer-measurment. I need the arithmetic and geometric mean and median. For the calculation of the geometric

Re: [R] (arbitrary) precision

2005-02-18 Thread Kjetil Brinchmann Halvorsen
Gabor Grothendieck wrote: Michael Grottke Michael.Grottke at duke.edu writes: : I am currently using R for fitting a model to various data sets : (minimizing the negative log-likelihood) and calculating a number of : metrics based on the parameter estimates. Within these calculations, I : have

Re: [R] Profiles graphics in a contingency table

2005-02-12 Thread Kjetil Brinchmann Halvorsen
Campo Elías PARDO wrote: Dear Users, How can I obtain a profiles graphic in a CT similar to Excel. Campo Elias PARDO [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Displaying a distribution -- was: Combining two histograms

2005-02-02 Thread Kjetil Brinchmann Halvorsen
Berton Gunter wrote: Rug plots cannot show replicated values -- spikes at discrete values -- in the data distribution. Quantile plots do. But you can use rug(jitter(x)) Kjetil -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to

Re: [R] Finding runs of TRUE in binary vector

2005-01-28 Thread Kjetil Brinchmann Halvorsen
Sean Davis wrote: I have a binary vector and I want to find all regions of that vector that are runs of TRUE (or FALSE). a - rnorm(10) b - a0.5 b [1] TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE TRUE My function would return something like a list: region[[1]] 1,3 region[[2]] 5,5

Re: [R] Conflicts using Rcmdr, nlme and lme4

2005-01-28 Thread Kjetil Brinchmann Halvorsen
Douglas Bates wrote: I can guarantee that this is the last time that I will fundamentally redesign the computational methods and data structures used in fitting mixed-effects models. This is the fifth time I have done it from scratch and after this one I am quitting the business. Hope that

Re: [R] Data Simulation in R

2005-01-19 Thread Kjetil Brinchmann Halvorsen
Uwe Ligges wrote: Doran, Harold wrote: Thanks. But, I think I am doing that. I use rm() and gc() as the code moves along. The datasets are stored as a list. Is there a way that I can save the list object and call each dataset within a list one at a time, or must the entire list be in memory at

Re: [R] way off topic

2005-01-19 Thread Kjetil Brinchmann Halvorsen
Erin Hodgess wrote: Dear R People: Here is another off topic question, please: Does anyone know where to find some archaelogical data (carbon dating), please? http://lib.stat.cmu.edu/DASL/ has archeology as a topic. Kjetil When I googled, I got reseach papers but no data. Thanks, Sincerely,

  1   2   3   >