Re: [R] Estimate Discrete Choice Models with R

2009-08-18 Thread Kjetil Halvorsen
Discret choice models often require multinomial probit. The CRAN package MNP can do that. Kjetil On Sat, Aug 15, 2009 at 8:50 PM, Ronggui Huang wrote: > glm can do probit regression, and glmer (lme4 package) and do mixed > effect logit model. > > Ronggui > > 2009/8/16 Hongwei Dong : >> Thanks for

Re: [R] block matrices

2010-02-24 Thread Kjetil Halvorsen
see below. On Wed, Feb 24, 2010 at 12:56 PM, Gustave Lefou wrote: > Dear all, > > I do not know how to deal with block matrices in R. > > For example I have 3 matrices A, B and C. > > And I want to produce a new matrix of this form > > ( A B 0 ) > ( 0 0 C ) > > where A, B and C are one-row matric

Re: [R] tetrachoric correlations

2010-04-03 Thread Kjetil Halvorsen
Did you REALLY try RSiteSearch("tetrachoric") before sending your email? Kjetil On Fri, Apr 2, 2010 at 7:25 PM, HAKAN DEMIRTAS wrote: > Hi, > > Is there any R library/package that calculates tetrachoric correlations from > given marginals and Pearson correlations among ordinal variables? > > I

Re: [R] histogram-like barplot? (or reverse?)

2010-04-03 Thread Kjetil Halvorsen
It might work to just say barplot(table(...)) Kjetil CC Or maybe even plot(table(...)) On Sat, Apr 3, 2010 at 5:14 PM, Bob O'Hara wrote: > Hi, Nick! > > plot(.., type="h", lwd=5, lend=3, xaxt="n") > axis(1, at=c(...)) > > is the way to start, after which you play with the code. For yea

Re: [R] read.table behavior for Dates.

2010-04-16 Thread Kjetil Halvorsen
use the argument colClasses of read.table Kjetil On Fri, Apr 16, 2010 at 3:32 PM, Jeroen Ooms wrote: > > When read.table imports a table that includes a header called 'Date', it > tries to recognize the date format. For example, if one imports this data > from Yahoo finance, the Date column is

Re: [R] Growth potential for open source math tools: 10 questions

2010-04-25 Thread Kjetil Halvorsen
I went to this site --- half of the questions are about "how much do you want to pay for training courses" Kjetil On Sun, Apr 25, 2010 at 5:25 PM, Tal Galili wrote: > Maybe I missed something - but *why* should we do it? > > > Contact > Details:---

Re: [R] Maps: Country coding

2010-04-27 Thread Kjetil Halvorsen
have a look at the cran pacvkage countrycode! Kjetil On Tue, Apr 27, 2010 at 5:30 PM, Ray Brownrigg wrote: > On Wed, 28 Apr 2010, Berthold Stegemann wrote: >> Hello, >> >> I am using the maps library for plotting maps. >> >> To build new geograhical sets such as Europe I use >> >> europe = c('Ge

Re: [R] Interaction terms in logistic regression using glm

2010-04-29 Thread Kjetil Halvorsen
see comments below. On Wed, Apr 28, 2010 at 4:29 PM, Andrew Miles wrote: > I recently became aware of the article by Ai and Norton (2003) about how > interaction terms are problematic in nonlinear regression (such as logistic > regression).  They offer a correct way of estimating interaction effe

Re: [R] Robust ANOVA with variance heterogeneity

2009-10-02 Thread Kjetil Halvorsen
On Fri, Oct 2, 2009 at 8:45 AM, David Winsemius wrote: > There are multiple routes to "robust" statistics, but the quick answer to > this question is probably friedman.test I don't think friedman.test is robust to variance heterogeneity. It is only robust to non-normality. Kjetil > > I seem t

Re: [R] R on Linux, and R on Windows , any difference in maturity+stability?

2009-10-06 Thread Kjetil Halvorsen
On Tue, Oct 6, 2009 at 11:23 AM, Duncan Murdoch wrote: > On 10/6/2009 10:34 AM, Jose Quesada wrote: >> >> Robert Wilkins gmail.com> writes: >> >>> >>> Will R have more glitches on one operating system as opposed to >>> another, or is it pretty much the same? >>> >>> robert >>> >>> >> >> One impor

Re: [R] Robust ANOVA with variance heterogeneity

2009-10-06 Thread Kjetil Halvorsen
OP look at >  rlm(MASS) or lmrob(robustbase). > > -- > David > > On Oct 2, 2009, at 11:05 AM, Kjetil Halvorsen wrote: > >> On Fri, Oct 2, 2009 at 8:45 AM, David Winsemius >> wrote: >>> >>> There are multiple routes to "robust" st

Re: [R] Simulate negative skewed, fat-tailed distribution

2009-10-07 Thread Kjetil Halvorsen
another possibility is to use skew-t distributions, from package: fGarch, for instance. Kjetil On Wed, Oct 7, 2009 at 1:13 PM, Ravi Varadhan wrote: > Take a look at the `rstable' function in the "stable" package to simulate > random deviates from a stable distribution. > > Ravi. > >

Re: [R] reference on fisher.test()

2009-10-16 Thread Kjetil Halvorsen
For some alternative views (and references) for FET see: http://www.stat.columbia.edu/~cook/movabletype/archives/2009/10/what_is_the_bay.html#comments kjetil On Fri, Oct 16, 2009 at 8:38 AM, Prof Brian Ripley wrote: > On Fri, 16 Oct 2009, Robin Hankin wrote: > >> Hi >> >> fexact.c points you to

[R] Matrixes as data

2009-10-16 Thread Kjetil Halvorsen
Hola! I am working on a problem where data points are (square) matrices. Is there a way to make a "vector" of matrices, such that it can be stored in a data.frame? Can that be done with S3? or do I have to learn S4 objects & methods? Kjetil __ R-help@r

Re: [R] Matrixes as data

2009-10-16 Thread Kjetil Halvorsen
, Barry Rowlingson wrote: > On Fri, Oct 16, 2009 at 4:36 PM, Kjetil Halvorsen > wrote: >> Hola! >> >> I am working on a problem where data points are (square) matrices. Is >> there a way to make a >> "vector" of matrices, such that it can be stored in a dat

Re: [R] looking for reference that covers convergence in distribution

2009-10-18 Thread Kjetil Halvorsen
see below. On Sat, Oct 17, 2009 at 5:51 PM, Peng Yu wrote: > On Sat, Oct 17, 2009 at 3:28 PM, Peter Dalgaard > wrote: >> Ben Bolker wrote: >>> >>> >>> Peng Yu wrote: I am looking for a good probability book that describes convergence in distribution. I have looked through Introduc

Re: [R] MLE for lambda of Poisson distribution using fitdistr

2009-10-27 Thread Kjetil Halvorsen
What is wrong with using mean(x) to get the MLE of the poisson lambda? Kjetil On Tue, Oct 27, 2009 at 9:17 AM, David Winsemius wrote: > > On Oct 26, 2009, at 11:25 PM, ankush...@yahoo.com wrote: > >> Hi, >> >> I am using the fitdistr of MASS to get the MLE for the lambda of a Poisson >> distribu

Re: [R] Non-normal residuals.

2009-10-28 Thread Kjetil Halvorsen
On Wed, Oct 28, 2009 at 7:25 AM, David Scott wrote: > Karl Ove Hufthammer wrote: >> >> On Tue, 27 Oct 2009 18:06:02 -0400 Ben Bolker wrote: >>> >>>  If transforming your data brings you closer to satisfying >>> the assumptions of your analytic methods and having a sensible >>> analysis, then that

Re: [R] Bayesian regression stepwise function?

2009-10-30 Thread Kjetil Halvorsen
On Fri, Oct 23, 2009 at 6:05 PM, Ravi Varadhan wrote: > Frank, > > I have heard this (i.e. only head-to-head comparisons are valid) and various > other folklores about AIC and BIC based model selection before, including > one that these information criteria are only applicable for comparing two >

Re: [R] Time Series methods

2009-11-01 Thread Kjetil Halvorsen
introduce a factor variable with the months and then use tapply? Kjetil On Sun, Nov 1, 2009 at 9:07 PM, Tim Bean wrote: > Hello, I have a quick question about time series methodology. If I want to > display a boxplot of time series data, sorted by period, I can type: > > boxplot(data ~ cycle(dat

Re: [R] Normal distribution test

2009-11-17 Thread Kjetil Halvorsen
On Tue, Nov 17, 2009 at 11:17 AM, Markus Mehrwald wrote: > Hi all, > > I am completely new to R and my knowledge of statistics is quite small so I > hope you can help my. > I have three dimensional point data which represents (and this is what I do > not know for sure) a normal distribution. Now I

[R] lattice --- different properties of lines corresponding to type=c("l", "a") respectively

2009-11-26 Thread Kjetil Halvorsen
", ylim=c(0, 10), panel=panel.superpose, panel.groups=mypanel) (which doesn't work) ??? Kjetil Halvorsen To recreate the data: repa0 <- structure(list(group = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1

Re: [R] Concave hull

2009-11-26 Thread Kjetil Halvorsen
There is a package on CRAN implementing such an idea: alphahull, phull is other package, kjetil On Thu, Nov 26, 2009 at 6:11 PM, baptiste auguie wrote: > 2009/11/26 Ted Harding : >> Raising a rather general question here. >> >> This is a tantalising discussion, but the notion of "concave hull" >

[R] my failing understanding ...

2009-11-27 Thread Kjetil Halvorsen
The following I do not understand, but then I did'nt really use S4 methods ... > showMethods(plot) Function: plot (package graphics) x="ANY" x="lmList.confint" x="merMCMC" (inherited from: x="ANY") > plot(x=moda0MCMC) Error in as.double(y) : cannot coerce type 'S4' to vector of type 'double

Re: [R] grep() exclude certain patterns?

2009-12-04 Thread Kjetil Halvorsen
Maybe, atleast for the most used functions, there should be a section in the .Rd file with name "for newbies"? Kjetil On Fri, Dec 4, 2009 at 6:18 PM, Peng Yu wrote: > On Fri, Dec 4, 2009 at 3:06 PM, Peng Yu wrote: >> On Fri, Dec 4, 2009 at 2:35 PM, Greg Snow wrote: >>> The invert argument seem

Re: [R] MLE for a t distribution

2009-12-14 Thread Kjetil Halvorsen
Brian Ripley sometimes on this list or elsewhere suggested to reparametrize as 1/k. I have used that with good results. But you should be aware that usually data contains very little information about k, so thhat if you do not have a lot more than 100 observations you coukld be out of luck. You sho

Re: [R] R and Hierarchical Forecasting

2009-12-16 Thread Kjetil Halvorsen
I don't know of any prepackaged functions to do this, but I have done this with some success, using compositional methods: forecasting the total, and then forecasting the compositions.,, with compositional data analysis. The package compositions or robCompositions might be usefull. Or not. Kjetil

Re: [R] How to google for R stuff?

2009-05-20 Thread Kjetil Halvorsen
Sorry to be off-topic. See below. On Wed, May 20, 2009 at 5:38 PM, Emmanuel Charpentier < charp...@bacbuc.dyndns.org> wrote: > Le mercredi 20 mai 2009 à 09:02 -0400, Kynn Jones a écrit : > > Hi! I'm new to R programming, though I've been programming in other > > languages for years. > > > > On

Re: [R] R's documentation

2009-05-29 Thread Kjetil Halvorsen
On Fri, May 29, 2009 at 11:01 AM, Zheng, Xin (NIH) [C] < zheng...@mail.nih.gov> wrote: > Sometimes I get confused with R's documentation. It seems the documents is > not maintained and updated well. Anyone has similar feeling? I don't mean to > offend anyone. I hope R would get better and better.

Re: [R] fractal vs. Fractal packages

2009-04-14 Thread Kjetil Halvorsen
google gives nothing, and the archive section on CRAN has no Fractal. On Mon, Apr 13, 2009 at 10:31 PM, Erin Hodgess wrote: > Dear R People: > > At one time, there were packages called fractal and Fractal, > respectively, which had different functions. > > I can't seem to find Fractal any more.

Re: [R] Multivariate Poisson GLM??

2010-01-05 Thread Kjetil Halvorsen
You could have a look at the VGAM (vector glm /gam models) at CRAN. Kjetil On Tue, Jan 5, 2010 at 5:59 PM, Corey Sparks wrote: > Dear R Users, > I'm working on a problem where I have a multivariate response vector of > counts and a continuous predictor. >  I've thought about doing this the same

Re: [R] logistic regression based on principle component analysis

2010-01-07 Thread Kjetil Halvorsen
for an alternative (lasso) approach, look at the packages (CRAN) grpreg, grplasso, glmnet, penalized and certainly some others. Kjetil B H On Thu, Jan 7, 2010 at 2:06 PM, Steve Lianoglou wrote: > Hi, > > On Thu, Jan 7, 2010 at 11:57 AM, 江文恺 wrote: >> >> Dear all: >> >> I try to analyse a datas

Re: [R] Lyapunov Discrete Time Equation

2010-01-29 Thread Kjetil Halvorsen
¿Did you do your homework before posting? ¿Did you read the posting guide? I do not know of anything in R, but searching the web gives a lot of info, there is a good article in wikipedia, and there are a lot of papers accessible. Code, which probably can be used with R, can be found on the followin

Re: [R] Call m file in R

2010-01-30 Thread Kjetil Halvorsen
fortune("reverse") On Sat, Jan 30, 2010 at 1:38 PM, Yong Zhang wrote: > Hi, > > > > Does anyone know how to call a Matlab file (M-file) in R? > > Thanks! > > > > Yong > > >        [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailin

Re: [R] performing the same commands on two different data sets

2010-02-09 Thread Kjetil Halvorsen
Did you try data<-ID[[i]] instead of your data<-ID[i]? Kjetil On Tue, Feb 9, 2010 at 11:19 AM, kayj wrote: > > Hi All, > > > I would like to perform the same set of commands on the two different sets. > I would to avoid writing the same set of command twice so I was wondering if > there is an

Re: [R] R 3.0.0

2013-05-24 Thread Kjetil Halvorsen
I dont know of any package called "glm". Did you try ?glm Kjetil On Fri, May 24, 2013 at 5:29 PM, Simmons, Susan J. wrote: > In the newest release of R (R 3.0.0), the "glm" package no longer supports > logistic nor probit regression. Was this intentional? What package is > best to use in the

Re: [R] R for commercial use

2012-09-25 Thread Kjetil Halvorsen
well, R includes a Turing-complete programming language, so I guess It really is difficult to answer NO to any of this questions? They do not seem very precise. Kjetil On Tue, Sep 25, 2012 at 9:15 AM, mlell08 wrote: > Hi, > > On 24.09.2012 16:21, Zastko,Samuel ALB co-mw wrote: >> Hi everyone, >>

[R] converting matlab code including C/mex to R

2012-10-04 Thread Kjetil Halvorsen
The title says it all! I am starting upon such a project, but now next to nothing about matlab/mex and how matlab-to-C communication is done. Any hints? links? (I am starting now to read up on mex) kjetil __ R-help@r-project.org mailing list https://st

Re: [R] Send Email from R

2012-10-10 Thread Kjetil Halvorsen
see inline below. On Tue, Oct 9, 2012 at 10:35 AM, Rantony wrote: > Hi, > > i wanted to send a mail from R (using Eclips). > Currently i installed the following packages > base64_1.1 > sendmailR_1.1-1 > mail_1.0.tar.gz > Rmail_1.1.tar.gz > > But while installing package some error was occuring.

[R] strange error message from freedesktop.org in the R window!

2010-06-15 Thread Kjetil Halvorsen
is better on my eyesighy) and " Visual effects" none. This in effect turns of the nvidia driver, and seems to keep emacs 23 hqappy. But why this strange Freedesktop.org messages above? --- Whivh repeat with an annoying freequency. \ Thanksd Kjetil Halvorsen __

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-21 Thread Kjetil Halvorsen
One should also take into account the other R list. For example, as of today the number of subscribers to R-help-es (R-help for spanish speakers) is 290, increasing. Kjetil Halvorsen On Sun, Jun 20, 2010 at 6:28 PM, Muenchen, Robert A (Bob) wrote: > > >>-Original Message- &g

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-22 Thread Kjetil Halvorsen
ttps://stat.ethz.ch/mailman/listinfo Kjetil > > Thanks, > Bob > >>-Original Message- >>From: Kjetil Halvorsen [mailto:kjetilbrinchmannhalvor...@gmail.com] >>Sent: Monday, June 21, 2010 9:12 AM >>To: Muenchen, Robert A (Bob) >>Cc: ted.har

Re: [R] Unique Data Frame Name?

2010-06-23 Thread Kjetil Halvorsen
\Why not put all the data frames in a list? Kjetil On Wed, Jun 23, 2010 at 6:56 PM, Douglas M. Hultstrand wrote: > Hello, > > I am trying to create a data frame with a unique name, based on indexing of > for loop.  I was wondering if there is a way to do this, I keep running into > errors when I

Re: [R] Euclidean Distance Matrix Analysis (EDMA) in R?

2010-06-24 Thread Kjetil Halvorsen
¿Is'nt this just another name for multidimensional scaling? Kjetil On Thu, Jun 24, 2010 at 9:15 AM, Tal Galili wrote: > Isn't this what > ?dist > Does ? > > Tal > > Contact > Details:--- > Contact me: tal.gal...@gmail.com |  972

Re: [R] Euclidean Distance Matrix Analysis (EDMA) in R?

2010-06-25 Thread Kjetil Halvorsen
There is a freely downloadable and very relevant (& readable) book at https://ccrma.stanford.edu/~dattorro/mybook.html "Convex Optimization and Euclidean Distance geometry", and it indeed names EDMA as a form of multidimensional scaling (or maybe in the oposite way). You should have a look at the c

Re: [R] Forcing scalar multiplication.

2010-06-25 Thread Kjetil Halvorsen
?sweep On Fri, Jun 25, 2010 at 2:43 PM, wrote: > I am trying to check the results from an Eigen decomposition and I need to > force a scalar multiplication. The fundamental equation is: Ax = lx. Where > 'l' is the eigen value and x is the eigen vector corresponding to the > eigenvalue. 'R' re

Re: [R] distance matrix?

2010-06-28 Thread Kjetil Halvorsen
abs(outer(1:10, 1:10, FUN="-")) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]012345678 9 [2,]101234567 8 [3,]210123456 7 [4,]321012

Re: [R] Can anybody help me understand AIC and BIC and devise a new metric?

2010-07-05 Thread Kjetil Halvorsen
You should have a look at: "Model Selection and Model Averaging" Gerda Claeskens K.U. Leuven Nils Lid Hjort University of Oslo Among other this will explain that AIC and BIC really aims at different goals. On Mon, Jul 5, 2010 at 4:20 PM, Dennis Murphy wrote: > Hi: > > On Mon, Jul 5, 2010 at 7:3

Re: [R] Calculating with tolerances

2010-09-09 Thread Kjetil Halvorsen
I tried RSiteSearch("Interval aritmetic") which gives zero hits. There exist a http://www.boost.org/ free software library for interval aritmetic, which it shoub be possible to link to R. Kjetil On Thu, Sep 9, 2010 at 6:28 PM, Carl Witthoft wrote: > > That won't do much good.  Tolerances don'

Re: [R] Web forum - should I make one?

2010-09-21 Thread Kjetil Halvorsen
Did you look at: http://rwiki.sciviews.org/doku.php ? Kjetil 2010/9/21 Vojtěch Zeisek : > Hello, > this might be little off-topic, but still... I have not found any official web > forum for R users. Did I look good? If not, I'm sorry and shame on me! :-) > Such forums are very probably the most c

Re: [R] R editor in ubuntu!

2010-10-05 Thread Kjetil Halvorsen
emacs23+ess is great BUT there is a very large problem which is driving me away from it: (on ubuntu) since version 23, emacs has a very problematic bug, which I have reported as: bug#6193: emacs 23 in ubuntu 10.04 gnu linux: black lines overwrite text! but the emacs devs does'nt seem to respond.

Re: [R] R editor in ubuntu!

2010-10-05 Thread Kjetil Halvorsen
see below. On Tue, Oct 5, 2010 at 10:25 AM, Laurent Gatto wrote: > Dear Kjetil, > > On 5 October 2010 15:12, Kjetil Halvorsen > wrote: >> emacs23+ess is great BUT there is a very large problem which is >> driving me away from it: >> (on ubuntu) since version 23, em

Re: [R] R editor in ubuntu!

2010-10-05 Thread Kjetil Halvorsen
I really like emacs+ess, so getting that to work again is the preferred solution... Kjetil On Tue, Oct 5, 2010 at 11:50 AM, Erik Iverson wrote: > >> Another alternative is to use Geany [1]. It would save you the trouble >> of learning Emacs, > > /s/save/deprive > /s/trouble/thrill > > :) > > ___

Re: [R] R editor in ubuntu!

2010-10-05 Thread Kjetil Halvorsen
Forgot ... The best thing with emacs , it that it has modes for close to everything, so you don'nt need to learn new editors for whatever strange projecy you start. By the way, i installed eclipse to try it out. It is way of biggish... Kjetil On Tue, Oct 5, 2010 at 12:30 PM, Kjetil Halv

[R] compiling and testing R-2.12.0

2010-10-15 Thread Kjetil Halvorsen
I downloaded the tarball for R-2-12.0, made ./configure make without problems. Then make test ...which have now been running for more than an hour, and seems to have stalled at: comparing 'reg-plot-latin1.ps' to './reg-plot-latin1.ps.save' ... OK make[3]: Leaving directory `/home/kjetil/R/R-2.12.

Re: [R] cube root of a negative number

2010-10-26 Thread Kjetil Halvorsen
Look at this: > x <- as.complex(-4) > x [1] -4+0i > x^(1/3) [1] 0.793701+1.37473i > (-4)^(1/3) [1] NaN It seems that R gives you the principal root, which is complex, and not the real root. Kjetil On Tue, Oct 26, 2010 at 8:05 PM, Gregory Ryslik wrote: > Hi, > > This might be me missing somethi

[R] installing ONLY the documentation files (Rd) for many packages?

2010-10-26 Thread Kjetil Halvorsen
I have been searching the documentation for some time nmow, but cannot find it. It must be possible to download packages (many), but only install the help system? How? Kjetil __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

Re: [R] reading multiple XML files into an R table

2010-10-27 Thread Kjetil Halvorsen
for the loop part: put all your xml files in a directory with no other files, do setwd("directory/with/xml/files") files <- list.files() for (file in files) kjetil 2010/10/27 Ista Zahn : > Hi Jørgen, > You will be better served by learning how to find the answers to these > kinds of questions

Re: [R] Please help me about Monte Carlo Permutation

2010-10-28 Thread Kjetil Halvorsen
This is one way. I read your two columns of data into two variables, x and y. Then: test <- replicate(5000, cor(x, sample(y))) > hist(test) Kjetil On Thu, Oct 28, 2010 at 9:49 AM, Chitra wrote: > >> Dear R experts, >>I am sorry for my inability. >>I have the following dataset: > >  > Qtot Ito

Re: [R] A competition to create a recommendation engine for R packages

2010-10-28 Thread Kjetil Halvorsen
Follow-up. Started to look at this. First step is to make a graph showing dependencies between R packages(CRAN, Bioconductor,Omegahat). As a curiosum, this graph has diameter 20: > require(igraph) > diameter(CRANgraph) [1] 20 > dia <- get.diameter(CRANgraph) > dia [1] 221 1866 2344 2192 330 161

Re: [R] Hashing and environments

2010-11-06 Thread Kjetil Halvorsen
some of this can be automated using the CRAN package hash. Kjetil On Sat, Nov 6, 2010 at 10:43 PM, William Dunlap wrote: > I would make make an environemnt called wfreqsEnv > whose entry names are your words and whose entry > values are the information about the words.  I find > it convenient to

Re: [R] exploratory analysis of large categorical datasets

2010-11-13 Thread Kjetil Halvorsen
you can also look at correspondence analysis, which is implemented in multiple CRAN packages, for instance MASS, ade4 and others. See the multivariate analysis task view on CRAN. Kjetil On Thu, Nov 11, 2010 at 10:39 PM, Dennis Murphy wrote: > Hi: > > A good place to start would be package vcd an

[R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-19 Thread Kjetil Halvorsen
This is very strange. (Debian squeeze, R 2.12.0 compiled from source) I did some moderately large computation (including svd of a 560x50 matrix), running a few minutes, and R memory increasing to about 900MB on this 2 GB ram laptop. I had done Rprof(memory.profiling=TRUE) first. Then doing summary

Re: [R] autocorrelation in count data

2010-11-19 Thread Kjetil Halvorsen
see http://onlinelibrary.wiley.com/doi/10./j.1467-9892.2010.00684.x/abstract kjetil On Fri, Nov 19, 2010 at 6:02 PM, wrote: > hello, > > I try to model traffic accidents with the following model: > > glm.nb(y~j+w+m+sf+b+ft,data=fr[]). the problem is that there exist > autocorrelation  in th

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-20 Thread Kjetil Halvorsen
see below. 2010/11/20 Uwe Ligges : > > > On 19.11.2010 21:43, Kjetil Halvorsen wrote: >> >> This is very strange. (Debian squeeze, R 2.12.0 compiled from source) >> >> I did some moderately large computation (including svd of a 560x50 >> matrix), >> r

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-20 Thread Kjetil Halvorsen
n squeeze, 2Gb ram, 4Gb swap. I leave it running tonight. After finnishing this, giving some simple commands , like ls() or ?Rprof, leads to the problem described originally. Will post more info tomorrow. Kjetil On Sat, Nov 20, 2010 at 9:30 PM, Kjetil Halvorsen wrote: > see below. >

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-22 Thread Kjetil Halvorsen
see below. 2010/11/21 Uwe Ligges : > > > On 21.11.2010 18:13, Kjetil Halvorsen wrote: >>> ?save.image >> >> And at this point it has been running with one cpu at 100% for over an >> hour! > > > It's OK to take an hour (due to memory <-> d

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-22 Thread Kjetil Halvorsen
C: r-help@r-project.org >> Subject: Re: [R] ?summaryRprof running at 100% cpu for one hour ... >> >> see below. >> >> 2010/11/21 Uwe Ligges : >> > >> > >> > On 21.11.2010 18:13, Kjetil Halvorsen wrote: >> >> >>> ?save.image

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-22 Thread Kjetil Halvorsen
see below. On Mon, Nov 22, 2010 at 12:57 PM, Mike Marchywka wrote: > > > > > > > > > >> Date: Mon, 22 Nov 2010 12:41:06 -0300 >> Subject: Re: [R] ?summaryRprof running at 100% cpu for one hour ... >> From: kjetilbrinchmannhalvor...@gmail.com >> To: marchy

Re: [R] installing ONLY the documentation files (Rd) for many packages?

2010-11-26 Thread Kjetil Halvorsen
see below. On Wed, Oct 27, 2010 at 3:32 AM, Prof Brian Ripley wrote: > On Tue, 26 Oct 2010, Kjetil Halvorsen wrote: > >> I have been searching the documentation for some time nmow, but cannot >> find it. It must be possible to download packages (many), but only install >>

Re: [R] installing ONLY the documentation files (Rd) for many packages?

2010-11-26 Thread Kjetil Halvorsen
see below. On Fri, Nov 26, 2010 at 11:50 AM, Kjetil Halvorsen wrote: > see below. > > On Wed, Oct 27, 2010 at 3:32 AM, Prof Brian Ripley > wrote: >> On Tue, 26 Oct 2010, Kjetil Halvorsen wrote: >> >>> I have been searching the documentation for some time nmow, b

Re: [R] multivariate analysis

2010-11-27 Thread Kjetil Halvorsen
if you want linear models (not specified), something like this should work: Put your 1800 response variables (as columns) in a nx1800 matrix resp_mat, and then lm(resp_mat ~ latitude*age) # interactions lm(resp_mat ~ latitude+age # without interactions Kjetil On Fri, Nov 26, 2010 at 9:01 PM,

Re: [R] Extracting selected rows from a matrix

2010-11-29 Thread Kjetil Halvorsen
see below. On Mon, Nov 29, 2010 at 5:56 PM, pankaj borah wrote: > Hi, > > I have matrix of 104 columns and 3 rows (Each Row has rowname). > > I have 13 different  list of selected rownames (character) say 1000 each. Now > I want to extract the all the columns according to the rownames in eac

Re: [R] How to get 'R' to talk BACK to other languages / scripts??

2010-12-03 Thread Kjetil Halvorsen
see below. On Fri, Dec 3, 2010 at 3:23 PM, Mike Williamson wrote: > Hey everyone, > >    I know that I can call 'R' from other scripts, and that I can make > command calls from 'R' (e.g., using system() ).  But how can I get 'R' to > RETURN values to the script that called it.  E.g., I would like

Re: [R] testing and ploting t-distribution!!!!! Thank you so much:)

2010-12-03 Thread Kjetil Halvorsen
see inline. On Fri, Dec 3, 2010 at 11:03 PM, <5...@queensu.ca> wrote: > Hi everyone, > > i don't get the qqplot which is used to test if the sample followed a > t-distribution? > > qqplot(qt(ppoints(z), df = 7.6), z, xlab = "Q-Q plot for t dsn") > qqline(z) > > what qt() means? what ppoints() me

Re: [R] Integrate two function in R

2010-12-16 Thread Kjetil Halvorsen
see inline. On Thu, Dec 16, 2010 at 10:11 AM, Ben Bolker wrote: > Alaios yahoo.com> writes: > >> >> Hello I have two function in R >> like >> g(x)=2x-3 >> and s(x)=5x^2+2 >> >> and I want to find the integrafl of the g(x)*s(x) inside the interval of >> [a,b] >> > >  Analytically or numerically?

Re: [R] ideas, modeling highly discrete time-series data

2010-12-21 Thread Kjetil Halvorsen
You could try the timeseries list at https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=TIMESERIES kjetil On Mon, Dec 20, 2010 at 6:26 PM, Mike Williamson wrote: > Hello all, > >    First of all, thanks so those of you who helped me a week or so ago > managing a time series with varying gaps between

Re: [R] Link prediction in social network with R

2010-12-22 Thread Kjetil Halvorsen
You could start having a look at cran packages like sna or statnet, or search cran for "network" and you nfind a lot of packages! On Wed, Dec 22, 2010 at 12:00 AM, EU JIN LOK wrote: > > Dear R users > > I'm a novice user of R and have absolutely no prior knowledge of social > network analysis

Re: [R] How to measure correlations in terms of distance and draw them on a 2-dimmentional plot?

2010-08-19 Thread Kjetil Halvorsen
You could also try RSiteSearch("correlation circle") Kjetil On Thu, Aug 19, 2010 at 11:31 AM, weijian21cn wrote: > > Thank you all a lot for all the suggestion! > -- > View this message in context: > http://r.789695.n4.nabble.com/How-to-measure-correlations-in-terms-of-distance-and-draw-them-on

Re: [R] 3D tomography data

2010-08-31 Thread Kjetil Halvorsen
I guess you need to be more specific about what you want to do. But a search with RSiteSearch("Tomography") leeds to one package names RTOMO, which you can install by calling install.packages("RTOMO",dep=T) then type library(RTOMO) library(help=RTOMO) kjetil On Tue, Aug 31, 2010 at 9:41 AM,

Re: [R] Stirlings Approximation

2011-05-09 Thread Kjetil Halvorsen
?lchoose ?lgamma ?lfactorial On Mon, May 9, 2011 at 7:45 PM, Jim Silverton wrote: > I have some big combinations like: > choose 784645433 > > Can R compute these? > Is there any package that does stirlings approximation in R? > > -- > Thanks, > Jim. > >        [[alter

Re: [R] Decision Trees /Decision Analysis with R?

2011-06-08 Thread Kjetil Halvorsen
see inline below. On Wed, Jun 8, 2011 at 12:37 PM, Anupam wrote: > It is difficult for someone from a statistical frame of mind to understand > what this is about --- you need to think a bit differently. It is mostly a > simulation and decision analysis, with some use of statistical functions to

Re: [R] Regularization of a matrix that has some tiny negative eigenvalues

2011-01-31 Thread Kjetil Halvorsen
The Matrix package (which should already be insatlled on your computer, since it is "Recommended") have the function nearPD, which should do the job. Kjetil On Sat, Jan 29, 2011 at 1:32 AM, Dimitri Liakhovitski wrote: > Dear all: > > In what I am doing I sometimes get a (Hessian) matrix that has

Re: [R] Positive Definite Matrix

2011-02-01 Thread Kjetil Halvorsen
see inline below. On Tue, Feb 1, 2011 at 2:25 PM, Mike Marchywka wrote: > > > > >>Date: Tue, 1 Feb 2011 15:41:01 + >>From: alex.sm...@gmail.com >>To: spencer.gra...@structuremonitoring.com >>CC: r-help@r-project.org; maech...@stat.math.ethz.ch >>Subject: Re: [R] Positive Definite Matrix > > >

Re: [R] Simulation of Multivariate Fractional Gaussian Noise and Fractional Brownian Motion

2011-02-10 Thread Kjetil Halvorsen
What you can do to find out is to type into your R session RSiteSearch("multivariate fractional gaussian") That seems to give some usefull results. Kjetil On Tue, Feb 8, 2011 at 1:51 PM, Wonsang You wrote: > > Dear R Helpers, > > I have searched for any R package or code for simulating multivar

Re: [R] Bron-Kerbosch algorithm

2011-02-14 Thread Kjetil Halvorsen
You could have tried to type RSiteSearch("Bron-Kerbosch") into R. As it is, that does not give any hits. But in packages graph or igraph (on CRAN) there should be some algorithm. Kjetil On Mon, Feb 14, 2011 at 4:33 PM, Yan Jiao wrote: > Dear R users > > > > I need to solve the finding all cliqu

Re: [R] A Math question

2011-02-14 Thread Kjetil Halvorsen
or even better: http://mathoverflow.net/ On Sun, Feb 13, 2011 at 8:02 PM, David Winsemius wrote: > > On Feb 13, 2011, at 4:47 PM, Maithula Chandrashekhar wrote: > >> Dear all, I admit this is not anything to do R and even with >> Statistics perhaps. Strictly speaking this is a math related quest

Re: [R] Generating uniformly distributed correlated data.

2011-02-21 Thread Kjetil Halvorsen
one simple idea is to generate correlated normals (vector multivariate normal), and then use the cumulative distribution function F_i of component i such: F_i(X_i), which is uniform. Kjetil (this will not preserve tha value of the correlation coefficient, so you must experiment) On Mon, Feb 21,

Re: [R] QuadTree

2011-02-22 Thread Kjetil Halvorsen
Did you try RSiteSearch("QuadTree") ? It does seem to give some hits. On Sun, Feb 20, 2011 at 7:54 PM, Jaimin Dave wrote: > Could any one tell me how to implement QuadTree in R? > Or are there any packages avaialble to implement it in R. > >        [[alternative HTML version deleted]] > > __

Re: [R] linear regression and t-distribution

2011-02-22 Thread Kjetil Halvorsen
did you try RSiteSearch("t-regression") ? That seems to give some usefull hits. On Mon, Feb 21, 2011 at 7:42 AM, Rosario Garcia Gil wrote: > Hello > > I have a data set with outlier and it is not normally distributed. I would > instead like to use a more robust distribution like t-distribution

Re: [R] formal concept analysis in R?

2011-02-22 Thread Kjetil Halvorsen
You could try install.packages("sos", dep=T) library(sos) h <- finfFn("formal concept analysis") h but it does not seem to find anything relevant. On Wed, Feb 16, 2011 at 6:21 PM, Mark Heckmann wrote: > I am looking for an R package for formal concept analysis > (http://en.wikipedia.org/wiki/F

Re: [R] Parzen fractional degree of differencing estimator

2011-02-22 Thread Kjetil Halvorsen
searching using library(sos) h <- ???"Parzen fractional estimator" h leads to library(fracdiff) # on CRAN ?fdSperio On Wed, Feb 16, 2011 at 5:19 PM, Fologo Dubois wrote: > Does R have a function for Parzen fractional degree of differencing > estimator? I am referring to the non-parametric kern

Re: [R] power regression: which package?

2011-03-02 Thread Kjetil Halvorsen
?nls install.packages("nls2",dep=T) library(nls2) ?nls2 install.packages("nlstools") library(help=nlstools) install.packages("NISTnls", dep=T) library(help=NISTnls) the last one give access to many examples. On Wed, Mar 2, 2011 at 1:55 PM, David Croll wrote: > > > Dear R users and R friends, > >

Re: [R] sample size of 2 groups of skewed data

2011-03-15 Thread Kjetil Halvorsen
did you try to fit your data with a skew-normal/skew-t distribution? If that works, you can use simulation. Kjetil On Tue, Mar 15, 2011 at 2:31 AM, Lao Meng wrote: > Hi all: > I have a question on sample size calculation of 2 groups of data. If 2 > groups of data are all normal distribution, the

Re: [R] (R) transitions in a Markov Chain

2011-03-15 Thread Kjetil Halvorsen
To add to this, I am sure this have been answerted earlier on the list, so you could try to search the archives. On Tue, Mar 15, 2011 at 8:59 PM, Ben Bolker wrote: > Estefania Nares hotmail.com> writes: > >> I have to generate 1000 transitions of a discrete time Markov Chain and >> then give and

Re: [R] Re; Fitting a Beta distribution

2011-03-16 Thread Kjetil Halvorsen
If yoy write out the likelihood equations for an independent sample size n from the beta(a,b) distribution: L \propto \prod_i dbeta(y_i,a,b) log(L) = constant + \sum_i dbeta(y_i,a,b,log=TRUE) log(L)= constant + \sum_i (a-1) log(y_i) + (b-i) log(1-y_i) you see that your problem comes from trying to

Re: [R] R² for non-linear model

2011-03-17 Thread Kjetil Halvorsen
see inline. On Thu, Mar 17, 2011 at 4:58 AM, Rubén Roa wrote: > Hi Alexx, > > I don't see any problem in comparing models based on different distributions > for the same data using the AIC, as long as they have a different number of > parameters and all the constants are included. > For example

Re: [R] General help - online statistics courses?

2011-09-10 Thread Kjetil Halvorsen
On Thu, Sep 8, 2011 at 5:58 PM, Rolf Turner wrote: > On 09/09/11 06:46, Spencer Graves wrote: > > >> >> I'd rather ask a stupid question than make a stupid mistake. > > > > Fortune? > Its already there, more or less: library(fortunes) fortune("spencer") kjetil >    cheers, > >        Rolf Tur

Re: [R] Optimizing variables represented in a matrix

2012-05-31 Thread Kjetil Halvorsen
If you want an helpful answer, you must describe your real problem MUCHbetter! This is way too confused. Kjetil On Thu, May 31, 2012 at 7:37 AM, wrote: > > Dear R-list members, > > I have a matrix with non-numeric variables in it and I have to optimize the > variables of the matrix in a fo

Re: [R] Determinant and inverse using cholsky parameter

2012-06-08 Thread Kjetil Halvorsen
On Fri, Jun 8, 2012 at 10:08 AM, Özgür Asar wrote: > Hi, > > Isn't the Cholesky decomposition of A=L (L)^T where T stands for "transpose" > and L is the Cholesky factor of A. > > You say you have the  Cholesky decomposition, isn't it L (above)? > > A<-L%*%t(L) > det(A) > solve(A) > > would be your

  1   2   >