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] 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] 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] 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] 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] 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] 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] 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] 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] Generalized Singular Value Decomposition (GSVD)

2004-08-30 Thread Kjetil Brinchmann Halvorsen
Camarda, Carlo Giovanni wrote: Iæm not really sure what you mean by generalized SVD, but have you had a look at CRAN package PTAk, which says to have some extensions of the SVD (but poosibly not the one you want...?) Kjetil Halvorsen Dear R-users, I couldn't find a function or some help in

Re: [R] using hist() with tapply()

2004-09-01 Thread Kjetil Brinchmann Halvorsen
Schwarz,Paul wrote: Hi, I've been passing the hist() function to tapply() to quickly generate histograms based on the list of factors supplied to tapply(). However, I have not figured out how to generate titles for each of the histograms, which paste in the unique values of the list factors as

Re: [R] tests for non-stationarity

2004-09-04 Thread Kjetil Brinchmann Halvorsen
Jonathan Nott wrote: Dear R list members, Please excuse my ignorance but as a new comer to R I was wondering if anyone knows of any functions in R or Splus that can test a time-series for non-stationarity such as the Pettitt or the Mann-Kendall tests. Kind regards, Jon Nott [[alternative

Re: [R] R question

2004-09-04 Thread Kjetil Brinchmann Halvorsen
house-ball wrote: Hi, Would you help me solve the following question? Thanks. Question: If I try to set the probability=0.05 and find the approximate x. (The answer should be somewhere between 2.1782 and 2.1783.) I write about this R program as follows but I don¡¦t know how to get the value of x

Re: [R] R question

2004-09-05 Thread Kjetil Brinchmann Halvorsen
house-ball wrote: Why do you repeat an unclear question fou times? Please read the posting guide. It is not clear what is your problem. Kjetil halvorsen Hi, Would you help me solve the following question? Thanks. my program is as follows: library(mvtnorm) value-pmvnorm(lower=-Inf,

Re: [R] isoMDS

2004-09-08 Thread Kjetil Brinchmann Halvorsen
Doran, Harold wrote: Thank you. Quick clarification. isoMDS only works with dissimilarities. Converting my similarity matrix into the dissimilarity matrix is done as (from an email I found on the archives) d- max(tt)-tt Mardia, kent Bibby defines the standard transformation from a

Re: [R] ccf question

2004-09-10 Thread Kjetil Brinchmann Halvorsen
John Sibert wrote: Can someone please verify the interpretation of lag in the ccf function in the ts package. Suppose ccf(x,y). Do negative lags indicate that the events in x precede the events in y and positive lags indicate that events in y precede events in x? Thanks, John This you ncan

Re: [R] Removing constants from a data frame

2004-09-17 Thread Kjetil Brinchmann Halvorsen
David Forrest wrote: Suppose I have x-data.frame(v1=1:4, v2=c(2,4,NA,7), v3=rep(1,4), v4=LETTERS[1:4],v5=rep('Z',4)) or a much larger frame, and I wish to test for and remove the constant numeric columns. I made: is.constant-function(x){identical(min(x),max(x))} and apply(x,2,is.constant)

Re: [R] asypow.noncent: how does it work?

2004-09-21 Thread Kjetil Brinchmann Halvorsen
[EMAIL PROTECTED] wrote: I am trying to do power calculations for the proportional odds model using the asypow library. The code noncenta90b10-asypow.noncent(theta.ha=a9010,info.mat=infomatrixa90b10,constraints=constrt) returns Error in max(..., na.rm = na.rm) : invalid mode of argument. the

Re: [R] ordered probit and cauchit

2004-09-23 Thread Kjetil Brinchmann Halvorsen
roger koenker wrote: What is the current state of the R-art for ordered probit models, and more esoterically is there any available R strategy for ordered cauchit models, i.e. ordered multinomial alternatives with a cauchy link function. MCMC is an option, obviously, but for a univariate latent

Re: [R] moving average method for time series objects

2004-09-24 Thread Kjetil Brinchmann Halvorsen
Schwarz,Paul wrote: Dear R-Help readers, I suspect that this question must be a FAQ, but my investigation of the archives has not been very revealing. Is there an R function for calculating moving averages of time series objects? library(gregmisc) ?running test - ts(rnorm(100)) test2 -

Re: [R] geographically weighted glm

2004-09-24 Thread Kjetil Brinchmann Halvorsen
Mark Conrad wrote: Hi all, I am interested in obtaining R code related to geographically weighted regression. In particular, I am interested in building geographically weighted Poisson GLMs. The model will contain categorical and continuous x independent variables, with interaction effects

Re: [R] covariate selection?

2004-10-12 Thread Kjetil Brinchmann Halvorsen
Ian Fiske wrote: Hello, I am hoping someone can help me with the following multivariate issue: I have a model consisting of about 50 covariates. I would like to reduce this to about 5 covariate for the reduced model by combining cofactors that are strongly correlated. Is there a package or

[R] Problems understanding qr. family of functions

2004-10-13 Thread Kjetil Brinchmann Halvorsen
Hola! By my understanding of reading ?qr the following shold result a 3 x 3 matrix: (rw2000) x - matrix( rnorm(12), 4,3) y - matrix( rnorm(12), 4,3) xqr - qr(x) yqr - qr(y) qr.qty( xqr, qr.Q(yqr) ) # dim (3,3) [,1] [,2] [,3] [1,] 0.16815466 -0.1970936 0.2351670 [2,]

Re: [R] beginner questions: objects and scripts

2004-10-14 Thread Kjetil Brinchmann Halvorsen
Terry Mu wrote: hi, I got some questions on using R, 1. How do I check and edit definition of an object? for example, x - 1:100 You should'nt really redefine assignment, but something like - - function(xyz4, value) { v - deparse(substitute(value)) xname -

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

2004-10-15 Thread Kjetil Brinchmann Halvorsen
John Fox wrote: Dear Federico, A problem with applying a standard test of normality to LS residuals is that the residuals are correlated and heterskedastic even if the standard assumptions of the model hold. In a large sample, this is unlikely to be problematic (unless there's an unusual data

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

2004-10-15 Thread Kjetil Brinchmann Halvorsen
John Fox wrote: Dear Federico, A problem with applying a standard test of normality to LS residuals is that the residuals are correlated and heterskedastic even if the standard assumptions of the model hold. In a large sample, this is unlikely to be problematic (unless there's an unusual data

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

2004-10-15 Thread Kjetil Brinchmann Halvorsen
Liaw, Andy wrote: . . . . Also, I was told by someone very smart that fitting OLS to data with heteroscedastic errors can make the residuals look `more normal' than they really are... Don't know how true that is, though. Certainly true, since the residuals will be a kind of average, so the

[R] Off-Topic: LaTeX package listings

2004-10-03 Thread Kjetil Brinchmann Halvorsen
Hola! I ask here since I learnt from this list that the LaTeX package listings should be good for typesetting R code. I encountered one problem: \begin{lstlisting} X %*% V \end{lstlisting} in the output the * in %*% disappears! same with %/%, etc, the / disappears. Any ideas? Kjetil --

Re: [R] biplot.princomp with loadings only

2004-10-04 Thread Kjetil Brinchmann Halvorsen
Jari Oksanen wrote: On Thu, 2004-09-30 at 10:33, Christoph Lehmann wrote: Hi is there a way to plot only the loadings in a biplot (with the nice arrows), and to skip the scores? Just let me point out that there is a function for this in the CRAN package ade4,s.corcircle library(ade4)

Re: [R] Off-Topic: LaTeX package listings

2004-10-04 Thread Kjetil Brinchmann Halvorsen
Toby Popenfoose wrote: Kjetil Brinchmann Halvorsen kjetil at acelerate.com writes: Hola! I ask here since I learnt from this list that the LaTeX package listings should be good for typesetting R code. I encountered one problem: \begin{lstlisting} X %*% V \end{lstlisting} in the output

Re: [R] Help with normal distributions

2004-10-04 Thread Kjetil Brinchmann Halvorsen
Dimitris Rizopoulos wrote: Hi Mick, regarding your first question try the following, #if `x' is your data vector, then y - seq(min(x), max(x), length=200) hist(x, prob=TRUE) lines(y, dnorm(y, mean(x), sd(x))) Adding to this, what I do, a little bit simpler (?) is: hist(x, prob=TRUE) plot(

Re: [R] scatter plot and marginal

2004-10-04 Thread Kjetil Brinchmann Halvorsen
Paolo Bulla wrote: Hallo, I would like to add the marginal distributions along the X and the Y axis to a scatter plot. Can anybody help me, please? Thank you, Paolo The simplest thing you can do is like plot(x, y) rug(x, side=1, col=red) rug(y, side=2, col=red) or if there are many coincident x

Re: [R] How to get F Distribution values in R

2004-10-05 Thread Kjetil Brinchmann Halvorsen
pio claudio wrote: i tried to use df(x,df1,df2) but the values arent the same when i looked it up in a F Distribution table.. How to get the same F Distribution values in R as in the f table? __ [EMAIL PROTECTED] mailing list

Re: [R] Is it safe? Cochran etc

2004-10-09 Thread Kjetil Brinchmann Halvorsen
Dan Bolser wrote: I have the following contingency table dat - matrix(c(1,506,13714,878702),nr=2) And I want to test if their is an association between events A:{a,not(a)} and B:{b,not(b)} | b | not(b) | +-++ a | 1 | 13714 | +-++ not(a) |

Re: [R] Clustering of variable

2004-10-09 Thread Kjetil Brinchmann Halvorsen
clara gonçalves wrote: Hi! Does anybody know if there is any way to do clustering of variables? Thank you in advance, varclust() in Hmisc Kjetil Clara. [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list

Re: [R] Descriptive statistics table

2004-10-17 Thread Kjetil Brinchmann Halvorsen
Mihai Nica wrote: Greetings: I would like to make a table with descriptive statistics for a data.frame. I guess the question is how can I put together, in a table, the results from, say: apply(df, 2, mean, na.rm =T) apply(df, 2, median, na.rm =T) ... Thanks, Mihai Nica Jackson State

Re: [R] multiv

2004-10-18 Thread Kjetil Brinchmann Halvorsen
Oscar A. Moreno wrote: What happened to multiv package? I have installed R 2.0.0 in my Mac and I multiv is ORPHANED. If you want it you can go the orphaned subdirectory on CRAN could not find this package. I see other things have been reorganized. I have read What's New and I have used the

Re: [R] how to study the code of R

2004-10-18 Thread Kjetil Brinchmann Halvorsen
rongguiwong wrote: i want to study R programming by studying the existing code from R itself,but i don't know how to read the code,can any one give me some guide? my R is installed in /usr/lib/R/ One trick which can be usefull for a start is to use debug. Choose some function to learn, say

Re: [R] matrix of eigenvalues

2004-10-19 Thread Kjetil Brinchmann Halvorsen
Christian Jost wrote: I thought that the function eigen(A) will return a matrix with eigenvectors that are independent of each other (thus forming a base and the matrix being invertible). This seems not to be the case in the following example A=matrix(c(1,2,0,1),nrow=2,byrow=T) eigen(A) -ev

Re: [R] Cluster Analysis: Density-Based Method

2004-10-21 Thread Kjetil Brinchmann Halvorsen
Fernando Prass wrote: Hi people, Does anybody know some Density-Based Method for clustering implemented in R? Have you looked at CRAN package mclust? Thanks, Fernando Prass ___ Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o

Re: [R] Plotting Bivariate Normal Data

2004-10-24 Thread Kjetil Brinchmann Halvorsen
John Fox wrote: Dear Sarah, If the data are allegedly bivariate normal, then they are probably two vectors, not one. Assuming that this is the case, I know of nothing quite as neat as a univariate QQ plot to check visually for bivariate normality (perhaps someone else has a suggestion here), but

[R] as.list.matrix

2004-10-28 Thread Kjetil Brinchmann Halvorsen
I found the need of converting a matrix into a list of its columns (for use with do.call), and was surprised there was no method as.list.matrix, it could easily be a part of as.list default I wrote my.as.list.matrix - function(mat) { if(!is.matrix(mat))stop(Argument must be a matrix) n

Re: [R] as.list.matrix

2004-10-29 Thread Kjetil Brinchmann Halvorsen
know col() Peter Alspach Kjetil Brinchmann Halvorsen [EMAIL PROTECTED] 29/10/04 Daily?? You created the matrix in the first place: why not create a data frame instead - na.omit was written for data frames? And surely do.call is overkill for a 2-column matrix, and there seems

[R] Robust Poisson regression

2004-11-03 Thread Kjetil Brinchmann Halvorsen
Hola! Anybody knows if there exists somewhere in R some implementation of robust Poisson regression, where robust is taken in the sense as usen in rlm(MASS). I found something in the package wle, but only for the Poisson distribution, not for regression. For the moment I try to use linear

Re: [R] how to compute condition index?

2004-11-03 Thread Kjetil Brinchmann Halvorsen
rongguiwong wrote: is there any existing function for computing condition index? See ?kappa Kjetil analysing multivariate data say that we can use condition index to check multicollinearity.saying that we can get it via SVD. The elements of the diagnoal matrix are the standard deviations of

Re: [R] R/S-related projects on Sourceforge? Trove Categorization

2004-11-17 Thread Kjetil Brinchmann Halvorsen
[EMAIL PROTECTED] wrote: SNIP SourceForge.net will consider the inclusion of a programming language within the Trove system when we host at least 5 projects based on that language. Please advise: Do you know of 5 projects hosted on SourceForge.net based on this language? SNIP Gretl, RPad and

[R] CRAN problems

2004-11-19 Thread Kjetil Brinchmann Halvorsen
The area *Index of /bin/windows/contrib/2.1 (and also 2.0) **at the main CRAN site is at the moment empty' * -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra __ [EMAIL PROTECTED] mailing list

Re: [R] help! a urgent question

2004-11-19 Thread Kjetil Brinchmann Halvorsen
Go to http://cran.r-project.org/ and find the contributed documentation section. Kjetil an ying wrote: Dear Sir/Madam, I am doing a project related to R. However, it is always difficult find some R functions. The R user guide seems not complete. Is there any free document about all R functions ?

Re: [R] Plotting averages of y per x

2004-11-19 Thread Kjetil Brinchmann Halvorsen
Gregor GORJANC wrote: Hello! I often plot average of y instead of all y values, since one can easily see the trend if there is to many points and/or x might be like 1, 2, 3, 4, 5, ... and you might get a cloud (which can also be informative) and/or columns of points. Anyway, learning with R i

Re: [R] Running sum

2004-11-19 Thread Kjetil Brinchmann Halvorsen
Sean Davis wrote: I have vector X of length N that I want to have a running sum for (called Y). I just need max(Y). I do this with a for loop like so: Y - vector(length=N) Y[1] - X[1] for (i in 2:N) { Y[i] - Y[i-1]+X[i] } return(max(Y)) Is there a faster way to do

Re: [R] Running sum

2004-11-19 Thread Kjetil Brinchmann Halvorsen
Marc Schwartz wrote: On Fri, 2004-11-19 at 16:44 -0600, hadley wickham wrote: Perhaps I'm missing something, but isn't the maximum of the cumulative sum simply the last value, ie. sum(x)? Hadley Indeed! And...going back to Sean's original post he did write: I just need max(Y). Thus, a

[R] OOT: frailty-multinivel

2004-11-24 Thread Kjetil Brinchmann Halvorsen
Hola! I started to search for information about multilevel survival models, and found frailty in R. This seems to be something of the same, is it the same? Then: why the name frailty (weekness?) -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi

Re: [R] Package for multivariate binary logistic regression?

2004-11-30 Thread Kjetil Brinchmann Halvorsen
Lynne Baker wrote: I am trying to find out if someone has implemented a (McFadden-type) multivariate binary logistic regresssion package for R? From what I can tell, this is not available for R. Thank you, Lynne Baker [[alternative HTML version deleted]]

Re: [R] Choice modelling (was:(no subject))

2004-11-30 Thread Kjetil Brinchmann Halvorsen
[EMAIL PROTECTED] wrote: Hello, I am trying to estimate a choice model with varying choice set for each individual. I would like to fit different kinds of model (logit ,nested logit, probit...). So far I have found that package *mnp* allows me to estimate a probit model with varying choice set.

Re: [R] Relative subscripting

2004-11-30 Thread Kjetil Brinchmann Halvorsen
Tobias Muhlhofer wrote: Hi! I'm trying to do the following. I have monthly a dataset with, among other things, marketcap, and return. I want to multiply return by the marketcap of the previous month. How do I do this? In STATA (which I have used frequently in the past) I would simply use an

Re: [R] Combined variable names

2004-12-01 Thread Kjetil Brinchmann Halvorsen
Richard A. O'Keefe wrote: Tobias Muhlhofer [EMAIL PROTECTED] wrote: I am trying to define a large number of variables through a loop construct. He wants to do for (i in 1:100) { assign(paste(v, i, sep=), something or other...) } This is, of

Re: [R] how to use print() without column names?

2004-12-01 Thread Kjetil Brinchmann Halvorsen
Hu Chen wrote: Hi all, any guy who knows how to print a data frame without column names printed? I didn't find a parameter in print() function to turn off this. Neither in options(). Thanks in advance. __ [EMAIL PROTECTED] mailing list

Re: [R] Protocol for answering basic questions

2004-12-02 Thread Kjetil Brinchmann Halvorsen
Stuart Leask wrote: reasons! Most things in life a worth what you pay for them - ? I did'nt pay for my wife. Kjetil the currency here seems to be whether folks consider that a questioner has made an effort; if so, respondants seem happy to match it. I think it is astonishing that the R list

Re: [R] combine two strings

2004-12-03 Thread Kjetil Brinchmann Halvorsen
Ben-Yang Liao wrote: Hello, I would like to combine two strings while using R. For instance, string1 - abcde string2 - WXYZ I'd like to combine string1 and string2 into Sting3; and string3 should be abcdeWXZY. paste(string1, string2, sep=) Would you please tell me how to do it? Thank you very

Re: [R] multinomial probit

2004-12-03 Thread Kjetil Brinchmann Halvorsen
Charlie Sprenger wrote: Hello All, I'm trying to run a multinomial probit on a dataset with 28 data points and five levels (0,1,2,3,4) in the latent choice involving response variable. I downloaded the latest mnp package to run the regression. It starts

Re: [R] applying data generating function

2004-12-03 Thread Kjetil Brinchmann Halvorsen
ebru apaydÿfdn wrote: Can you write an R function to generate from N samples from the given Gibbs algorithm. Also we must repeat the study for different N values and different L values .And plot iterations vs F1 and iteration vs F2. F1, F2 ~N2 (0, ( 1 L ) )

Re: [R] information

2004-12-03 Thread Kjetil Brinchmann Halvorsen
Anna Maria Paganoni wrote: I would like to know if there exist any package on the profyle analysis, or on repeated measures, (AUC)... I don't know about profyle analyses, but have a look at the packages nlme (or lme4) which can do repeated measures. Kjetil Thank for answering me, Anna Maria

Re: [R] How about a mascot for R?

2004-12-03 Thread Kjetil Brinchmann Halvorsen
Philippe Grosjean wrote: I'd vote for the inchworm because what is more representative to stat? The Gauss curve, of course! What looks like a Gauss curve? The inchworm: Erling B. Andersen tells in his paper in Rasch Models: Foundations, Recent Developments, and Applications edited by G. H.

Re: [R] R program for row-column designs!

2004-12-03 Thread Kjetil Brinchmann Halvorsen
Xianggui QU wrote: Does anybody have an R program to generate row-column designs and to produce the incidence matrices? I would appreciate if you could share it with me! Thank you! Harvey. CRAN package crossdes has something for row-col design, but specifically for crossover designs, it

Re: [R] String manipulation---mixed case

2004-12-06 Thread Kjetil Brinchmann Halvorsen
Martin Maechler wrote: Gabor == Gabor Grothendieck [EMAIL PROTECTED] . . . Many people have been lamenting about too complicated examples on help pages. Yes, but the help examples should be advanced too! Long time ago, when I used excel a little, the

Re: [R] how to get how many lines there are in a file.

2004-12-06 Thread Kjetil Brinchmann Halvorsen
Liaw, Andy wrote: From: Marc Schwartz On Mon, 2004-12-06 at 22:12 +0800, Hu Chen wrote: hi all If I wanna get the total number of lines in a big file without reading the file's content into R as matrix or data frame, any methods or functions? thanks in advance. Regards See

Re: [R]time series - state space (was: no subject)

2004-12-06 Thread Kjetil Brinchmann Halvorsen
Rene Pineda 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 state model Please use an informative subject line! See ?arima and the references therein. See also the R Newsletter, volume 2/2,

Re: [R] Text Mining with R

2004-12-06 Thread Kjetil Brinchmann Halvorsen
Christian Schulz wrote: hi, i'm interested in text-mining, too and so make a trial. In Linux (suse9.2) it works fine, but in windows i can't install the source despite off installed perl, tools ,htmlhelp etc.. regards, christian Just downloaded, and had no problems running Rcmd INSTALL on the

[R] Strange error from R CMD INSTALL

2004-12-08 Thread Kjetil Brinchmann Halvorsen
I am trying to install a local package and get this unexpected error: -- Making package UMSA adding build stamp to DESCRIPTION installing R files installing data files installing man source files installing indices Error: couldn't find function na.omit Execution halted

Re: [R] Strange error from R CMD INSTALL

2004-12-08 Thread Kjetil Brinchmann Halvorsen
Kjetil Brinchmann Halvorsen wrote: I am trying to install a local package and get this unexpected error: -- Making package UMSA adding build stamp to DESCRIPTION installing R files installing data files installing man source files installing indices Error: couldn't find

Re: [R] correlation matrix o

2004-12-08 Thread Kjetil Brinchmann Halvorsen
Liliana Forzani wrote: Hi, I have data normal with mean 0, I was wondering how to get (using R) the best r such that the correlation matrix of my data has the form {r^(i-j)} where (i,j) indicate row and columm respectivly. Thanks. Liliana Thats the correlation matrix for an autoregressive(1)

Re: [R] finding the most frequent row

2004-12-11 Thread Kjetil Brinchmann Halvorsen
bogdan romocea wrote: Here's something that works. I'm sure there are better solutions (in particular the paste part - I couldn't figure out how to avoid typing a[i,1], ..., a[i,10]). a - matrix(nrow=1000,ncol=10) for (i in 1:1000) for (j in 1:10) a[i,j] - sample(1:0,1) b -

Re: [R] bootstrap package

2004-12-13 Thread Kjetil Brinchmann Halvorsen
Fredrik Lundgren wrote: Hello R'ers In previous versions of R (I now use 2.0.1) there was a package bootstrap. I wrote some programs that depended heavily on this package but can unfortunately not find it on Cran today. Is there any way to find an older version of bootstrap and use it with the

Re: [R] bootstrap package

2004-12-13 Thread Kjetil Brinchmann Halvorsen
Fredrik Lundgren wrote: Hello R'ers In previous versions of R (I now use 2.0.1) there was a package bootstrap. I wrote some programs that depended heavily on this package but can unfortunately not find it on Cran today. Is there any way to find an older version of bootstrap and use it with the

Re: [R] lists within a list / data-structure problem

2004-12-13 Thread Kjetil Brinchmann Halvorsen
Berton Gunter wrote: Jan: One thing to keep in mind: A list is vector. So vector-type operations like c(), [, etc. work on lists, too (but be careful). Some comments inline below that I hope will be helpful. A good reference on the S language is VR's S PROGRAMMING, which I recommend highly. You

Re: [R] VAR-Estimation

2004-12-17 Thread Kjetil Brinchmann Halvorsen
Marc Gronwald wrote: Hi, I want to estimate a VAR-model and calculate the impulse response function and a variance decomposition. I am familiar with standard R-functions, like e.g. arima. But I have not found equivalent functions to estimate a VAR-modell. Are there any functions available or

Re: [R] Problems with Excel (was SAS or R software)

2004-12-21 Thread Kjetil Brinchmann Halvorsen
Patrick Burns wrote: I'm in the process of researching problems with Excel. The references given by Tim and Marc seem to lead to discussions of most of the problems with statistical procedures in Excel. The executive summary is that if it is in Excel and it looks like statistics, then avoid it.

Re: [R] PBIB datataset

2004-12-21 Thread Kjetil Brinchmann Halvorsen
(Ted Harding) wrote: On 20-Dec-04 Douglas Bates wrote: This is a new version of SASmixed that was uploaded a couple of days ago. I changed it so that the fits are done with the lme4 version of lme. It should be faster and more reliable than the version of lme in the nlme package. This

Re: [R] Strange error from R CMD INSTALL

2004-12-23 Thread Kjetil Brinchmann Halvorsen
Brian D Ripley wrote: On Thu, 9 Dec 2004, Ray Brownrigg wrote: Date: Wed, 08 Dec 2004 09:33:22 -0400 From: Kjetil Brinchmann Halvorsen [EMAIL PROTECTED] I am trying to install a local package and get this unexpected error: -- Making package UMSA adding build stamp

Re: [R] error in gregmisc package

2004-12-26 Thread Kjetil Brinchmann Halvorsen
Snæbjörn Gunnsteinsson wrote: Hi, I just installed the gregmisc bundle. When I do library(gdata) (or library(gtools), library(gmodels)) everything works fine. When I do library(gplots) I get Error in parse(file, n, text, prompt) : syntax error on line 1850 Error in library(gplots)

[R] dataset lutenhorm in package bootstrap

2005-01-03 Thread Kjetil Brinchmann Halvorsen
The dataset lutenhorm in package bootstrap has four time series, while the book has only one. The one from the book is V4. V1 is just the time indeces. Anybody knows wht is V2, V3, V5 ? Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi

Re: [R] variance of combinations of means - off topic

2005-01-05 Thread Kjetil Brinchmann Halvorsen
Liaw, Andy wrote: You could try googling for delta method. I believe MASS even has code for that... Andy If you have the original data you can bootstrap --- else you need the standar errors and correlation between the means, and can use the delta methos as above. You could even use D or

Re: [R] variance of combinations of means - off topic

2005-01-05 Thread Kjetil Brinchmann Halvorsen
Liaw, Andy wrote: You could try googling for delta method. I believe MASS even has code for that... Andy also, help.search(delta) does give nothing usefull, so if it is in MASS it would be hidden, and need a \concept entry in the .Rd file. The delta method is really nothimg more (or less)

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,

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] 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] 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] (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] 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] 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] 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] 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: 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] 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: [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] 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

  1   2   3   >