[R] Problems with making a complex graphic

2006-09-21 Thread Kjetil Halvorsen
= data.frame) Thanks,Kjetil Halvorsen [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] AICc vs AIC for model selection

2006-07-15 Thread Kjetil Brinchmann Halvorsen
for RSiteSearch(best.arima), so I can't comment directly on your question. The forecast package is at http://www-personal.buseco.monash.edu.au/~hyndman/Rlibrary/forecast/ Kjetil Do you have only one series or multiple? If you have only one, I think it would be hard to justify more than a simple

[R] combinatorial programming problem

2006-05-26 Thread Kjetil Brinchmann Halvorsen
an inverse of the index function indx() --- se code below. It could for instance return the original k indexes in strictly increasing order, to make indx() formally invertible. Any ideas? Kjetil Code: # Implementing an S3 class for symarrays with array rank r for dimension # [k, k, ..., k] with k=r

Re: [R] access list component names with lapply

2006-04-19 Thread Kjetil Brinchmann Halvorsen
]) This is how I am doing this: mapply(functuion(x,y)myfun(x, y),x, names(x))) Kjetil Now I would like to append the names of the list components to their corresponding vectors with the c() function. I thought this could be done like in the following command, but it doesn't: lapply

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
I am looking for. Graphical inspection would be easy but is not an option due to the huge amount of series. Does function turnpoints)= in package pastecs help_ Kjetil Questions: 1. Which (if at all) of the many packages that handle time series is appropriate for my problem? 2

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 https

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

2006-03-05 Thread Kjetil Brinchmann Halvorsen
?scale ? Look at: x - rnorm(100, 5, 10) mean(x) [1] 4.304616 sd(x) [1] 9.926883 x - scale(x) mean(x) [1] 5.39499e-17 sd(x) [1] 1 Kjetil -- Kum-Hoe Hwang, Phone : 82-31-250-3516Email : [EMAIL PROTECTED] [[alternative HTML version deleted

Re: [R] error function

2006-03-05 Thread Kjetil Brinchmann Halvorsen
-project.org/posting-guide.html function erf if package (CRAN) NORMT3, as help.search(error function) could have told yoy. Kjetil __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http

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

2006-03-04 Thread Kjetil Brinchmann Halvorsen
! It is easier to help if you can post your example data in a way which can be cutpasted into R, for instance by using dput and posting the result. Kjetil Has my e-mail transgressed R etiquette? Don't think so --- except for the missing output from dput()! Farrel Buchinsky, MD --- Mobile (412) 779-1073

Re: [R] CCF and Lag questions

2006-03-02 Thread Kjetil Brinchmann Halvorsen
if you have missing values in the object try: ccf( data_ts[,var1], data_ts[,var2], na.action=na.pass) Does anyone know how to use the lag funciton and ccf together? Is it necessary? Kjetil 3) Suppose var1 and var2 are both of length 20. I would expect the correlation of the fourth lag of ccf

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
on the list a (long) time ago, so you can search the archives. I remember L Tierney opined they should be implementes as a (S4) class. Kjetil Nevertheless I want to implement an algorithm using such linear lists, porting a trusted program to R (S). I need: (from Modula/Oberon) pSC* = POINTER

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

2006-03-01 Thread Kjetil Brinchmann Halvorsen
) Try: RT - as.data.frame.table(RTyrday) And then I tried the following regression: mod1 - glm(RTyrday~julian+year, family=gaussian (link=identity),data=RT) here it is simpler with lm() Kjetil Wich didn't work since my vector RTyrday and julian don't have the same length. My

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
: sapply(1:10, function(i) your.task(i) ) sapply() will do the initialization for you! Kjetil __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting

Re: [R] function for prediting garch

2006-02-17 Thread Kjetil Brinchmann Halvorsen
) estimate a garch model to the residuals 3) predict the residuals 4) modify the prediction from 1) with the prediction from 3) Kjetil I think what I am looking for is akin to the garchsim and garchpred commands in Mathlab. Any help is appreciated. Thanks

Re: [R] read.table

2006-02-14 Thread Kjetil Brinchmann Halvorsen
test.csv Kjetil resulting in: test %y-%m-%d VALUE 1 1999-01-01 100 2 2000-12-31 999 Again Thanks in advance Diethelm Wuertz Phil Spector wrote: Look at the check.names= argument to read.table -- you want to set it to FALSE. But rememeber that you'l have

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

2006-02-14 Thread Kjetil Brinchmann Halvorsen
) or RSiteSearch(garch) But for me this only leads to univariate garch (at least two implementations). Kjetil Sincerely yours, -- Arun Kumar Saha, M.Sc.[C.U.] S T A T I S T I C I A N[Analyst] Transgraph Consulting [www.transgraph.com] Hyderabad, INDIA Contact # Home: +91-033-25558038

Re: [R] LCA in e1071

2006-02-13 Thread Kjetil Brinchmann Halvorsen
(on CRAN) might help. Kjetil and what function may I use? Thank you very much Lisa Wang Princess Margaret Hospital tel: 416 946 4501 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

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
$y,...) or even text(locator(), test, ...) Kjetil See ?locator. HTH, Fernando Mayer. Thomas Steiner escreveu: I want to write some text in a corner of my plot. Is it possible to get the xlim and ylim of an open window? Or is there anything similar like legend(x=bottomright

Re: [R] New user: Custom probability distribution

2006-02-09 Thread Kjetil Brinchmann Halvorsen
Calc - Random Data - Discrete, and selected the columns, and it created 50 random values in a new column.[1] How do I do the same thing in R? sample( 0:3, 50, prob=c(0.48, 0.24, 0.26, 0.12)) Kjetil [1] You may be wondering why I'm telling you this. Well, it's because if I were in your

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

2006-02-08 Thread Kjetil Brinchmann Halvorsen
(on CRAN). 2. Does R possess a LAD (Least Absolute Deviation) regression function? This can be done with package quantreg (on CRAN). Kjetil Any help? Thanks __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

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

2006-02-06 Thread Kjetil Brinchmann Halvorsen
) or simulation. Kjetil __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

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

2006-01-26 Thread Kjetil Brinchmann Halvorsen
colClasses Kjetil to as 'character columns' are columns in the data that are quoted. For columns of alphabetic strings (that aren't TRUE or FALSE) I can suppress conversion to factor with as.is=TRUE, but what I'd like to stop is the conversion of quoted numbers of the form 01,02

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

2006-01-25 Thread Kjetil Brinchmann Halvorsen
in the model, it is there, occulted,as the sum of the design variables representing the mixture is 1! So it is correct to use the corrected sum of squares. Kjetil 2) Could someone indicate some reference about this subject ? Thanks a lot. Regards Cleber N. Borges

Re: [R] Splitting the list

2006-01-05 Thread Kjetil Halvorsen
, and it may be useful to canvass them. Another possibi8lity, of course, is language-based lists. Any interest for r-spanish@ ...? Kjetil John Maindonald email: [EMAIL PROTECTED] phone : +61 2 (6125)3473fax : +61 2(6125)5549 Mathematical Sciences Institute, Room 1194, John

Re: [R] GLARMA

2006-01-03 Thread Kjetil Halvorsen
On 12/30/05, Âíµ¤ [EMAIL PROTECTED] wrote: Hello, I am a new R user and I need R code for GLARMA. I will be really thankful if you help me. You should really spell out an acronym like GLARMA. RSiteSearch(GLARMA) does't give anything. ou could have a look at package sspir. Kjetil Yours

Re: [R] An embarrassment of riches

2006-01-02 Thread Kjetil Halvorsen
would try mgcv (not in your list ... ), function gam. Kjetil Questions: Which package should I use, and which function in the package should I use for the regression? Here is the Google search result, restricted to r-project.org: http://www.google.com/search?as_q=locally+weighted+poisson

Re: [R] ARIMA?

2006-01-02 Thread Kjetil Halvorsen
? Is there a viable alterative to ARIMA out there to analyze a trend of 8 repeated measures w. 200 cases? So you have 200 short time series? Maybe have a look at package nlme? Kjetil Many thanks Stephen ?? http://mail.nana.co.il [[alternative HTML version deleted

[R] A comment about R:

2006-01-01 Thread Kjetil Halvorsen
to suffciently use R and maintain your skills with R. Kjetil [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org

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
) comment(myobj) - made last sunday of 2005 Kjetil Trevor In S/Splus this was always available, because objects were files. [are you sure about always available? In any case, objects were not single files anymore for a long time, at least for S+ on windows, and AFAIK also

Re: [R] Age of an object?

2005-12-14 Thread Kjetil Brinchmann Halvorsen
timestamp - function(obj, moretext){ comment(obj) - paste(Sys.time(), moretext, sep=\n) } but this does'nt work. myobj - 1:10 timestamp(myobj, test) Error in timestamp(myobj, test) : object obj not found Kjetil Trevor In S/Splus this was always available, because objects were files

Re: [R] Polytopic Vector Analysis (PVA)

2005-12-13 Thread Kjetil Brinchmann Halvorsen
there is something, and if not, maybe simple to adapt. Kjetil Halvorsen or if there are other means to get the same analysis that I do not know of. Any information regarding developments or use of this method would be helpful. Melanie Edwards [[alternative HTML version deleted

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

2005-12-13 Thread Kjetil Brinchmann Halvorsen
mentiones it on this thread: Tha CRAN package pastecs has function `regul' to regularize irregular time series. maybe that is what the original poster want. Kjetil Also it has no underlying regularity as the warning message states. To use as.ts one wants a series with an underlying regularity

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

2005-12-12 Thread Kjetil Brinchmann Halvorsen
into a vector: x-c(X1,X2,B1,C1,) Something like: do.call(rbind, lapply(x,get)) # not tested should work! Kjetil i used y-cbind(x). but what i got is a matrix of the names, not a combination of matrices. anybody know how to handle this? thanks a lot

Re: [R] Help: chisq.test

2005-12-10 Thread Kjetil Brinchmann Halvorsen
1 43 0 0 0 1 0 48 0 1 0 0 0 52 1 0 0 0 0 57 0 0 1 0 0 which is not what you want. Kjetil what is the difference between the two thanks bragadeesh __ R-help@stat.math.ethz.ch mailing

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
my.ts - ts.union(ts.1, ts.2)This latest command does not assume a commomtime base. Then plot(my.ts,plot.type=single, col=c(red, blue)) Kjetil Thanks. A man is not old until regrets take the place of dreams. Actor John Barrymore From: Berton

Re: [R] squared coherency and cross-spectrum

2005-12-05 Thread Kjetil Brinchmann Halvorsen
measurement of same phenomenon), are they correlated? Kjetil hope this helps. spencer graves Ling Jin wrote: Hi All, I have two time series, each has length 354. I tried to calculate the coherency^2 between them, but the value I got is always 1. On a website

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

2005-12-01 Thread Kjetil Brinchmann Halvorsen
for single boxplots, n 12 for multiple boxplots. Woul've it make sense to have an option to replace boxes with dotplots for only those groups with number of observations lesser tahn nmin=20 (say) Kjetil Peter Ehlers Martin Maechler wrote: Boxplots were invented by John W. Tukey and I think

Re: [R] help with R

2005-12-01 Thread Kjetil Brinchmann Halvorsen
ways I might try running stl() (i.e. plot(stl(zHO))). It's possible I've not properly specified the length of expected periodicity as a parameter (246 days in my case). In creating the timeseries 9ts) object you need myts - ts(mydata,, frequency=246) Kjetil All suggestions

[R] Question on KalmanSmooth

2005-11-28 Thread Kjetil Brinchmann Halvorsen
this,or is this an error? Kjetil Halvorsen __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] coherency-Time Series

2005-11-27 Thread Kjetil Brinchmann Halvorsen
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html See ?spectrum,and especially component $coh of output. Kjetil

Re: [R] multilevel models and sample size

2005-11-27 Thread Kjetil Brinchmann Halvorsen
now I can't make the sample size much bigger.So I want to ask if I use the multilevel model to analysis the data set,will it be acceptable? or unacceptable because of the small sample size? This kind of question I usually try to answer by simulation, which is very easy in R. Kjetil

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

2005-11-27 Thread Kjetil Brinchmann Halvorsen
- listfiles() results - lapply(files, yourprocessing()) where yourprocessing is a function taking as argument a file name and returning whatever you want. Kjetil I have tried to list all the files names in a vector e.g. listfiles[1:10,1] 1 H:/Rtest/AXP.txt 2H:/Rtest/BA.txt 3 H

Re: [R] R: pp plot

2005-11-24 Thread Kjetil Brinchmann Halvorsen
(log(2/alpha)/(2*n)), the lower and upper limits are pmax(F-eps ,0) and pmin(F+eps, 1). Disadvantage: the sample size must be large. Herwig There is also ecdf.ksCI in CRAN package sfsmisc. Kjetil __ R-help@stat.math.ethz.ch mailing list https

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

2005-11-21 Thread Kjetil Brinchmann Halvorsen
, na.rm = T)) ans - FALSE Try to double the : in place of Kjetil I am unable to see why the condition should have a length greater than 1, since any should give me a single logical value. Can any one tell me what is going on here? (I am using version 2.1.1 on Windows

[R] Use of paste with apply()

2005-11-06 Thread Kjetil Brinchmann halvorsen
,]24 apply(te, 1, sum) [1] 4 6 Why doesn't paste behave in apply as sum? Kjetil -- Checked by AVG Free Edition. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http

Re: [R] OLS variables

2005-11-06 Thread Kjetil Brinchmann halvorsen
way to get these, for instance, use poly() or polym() as in: lm(y ~ polym(x,z,degree=2), data=dat) Kjetil There are many terms in this model, however, if not quite 2^20. The introductory manual that comes with R has information on model formulas in Section 11. I hope this helps, John

Re: [R] Design of experiments: construction and calculation

2005-10-23 Thread Kjetil Holuerson
Bart Joosen wrote: Hi All, after searching a while on the R-project help archives, I found that I can construct factorial design with the conf.design package. Have a look at CRAN package AlgDesign Kjetil But now, how can I construct a design for 2 parameters at 3 levels and 1

Re: [R] npmc package

2005-10-21 Thread Kjetil Holuerson
becoming the new maintainer of the package, fix it such that it passes 'R CMD check' (for R-2.2.0) and resubmit it to CRAN; so it won't be orphaned anymore ... I just looked, this package is now neither in the orphaned subdirectory nor the main directory on CRAN ... Kjetil Carlos Regards

Re: [R] npmc package

2005-10-21 Thread Kjetil Holuerson
becoming the new maintainer of the Just checked. This package is not now in the ORPHANES subdirectory, neither in the main CRAN listing. Kjetil package, fix it such that it passes 'R CMD check' (for R-2.2.0) and resubmit it to CRAN; so it won't be orphaned anymore ... Carlos Regards

Re: [R] How to install R 2.2.0 Debian 'unstable' package in otherwise 'sarge' system

2005-10-12 Thread Kjetil Kjernsmo
the trick: deb http://cran.us.r-project.org/bin/linux/debian stable/ and allthough it isn't there yet, it'll probably be there soon. However, I played with apt-build the other day, and produced my own build. It was quite fun, so reading up on apt-build can be a nice exercise. Cheers, Kjetil -- Kjetil

Re: [R] Under-dispersion - a stats question?

2005-10-11 Thread Kjetil Holuerson
there is underdispersion. Underdispersion could arise if you have dependent responses, for instance, competition (say, between plants) could produce underdispersion. Then you would be better off changing to an appropriate model. maybe you could post more about your experimental setup? Kjetil Thank

Re: [R] Applying a function to each element of an array

2005-10-07 Thread Kjetil Holuerson
result? many thanks, mapply(helper, yourmat) gives you the elements of the matrix, as a vector. So you only must reassemble as a matrix: n - nrow(yourmat) p - ncol(yourmat) matrix( mapply(helper, yourmat), n, p) Kjetil Tim

Re: [R] R/S-Plus equivalent to Genstat predict: predictions over averages of covariates

2005-10-06 Thread Kjetil Holuerson
check out the effects package on CRAN. Kjetil Peter Dunn wrote: Hi all I'm doing some things with a colleague comparing different sorts of models. My colleague has fitted a number of glms in Genstat (which I have never used), while the glm I have been using is only available for R

Re: [R] update MASS

2005-10-01 Thread Kjetil Holuerson
Ramón Casero Cañas wrote: I'd like to update MASS from version 7.2-11 to version 7-2.19. I am running R 2.0.1 on ubuntu, that installs MASS with the package r-cran-vr. My installed version of MASS, 7-2.20, has version requirement R= 2.1.0, so you will need to update R first. Kjetil I have

Re: [R] Fisher's discriminant functions

2005-09-29 Thread Kjetil Holuerson
This are in various packages, you could have a look at ade4 (on CRAN). Kjetil C NL wrote: Hi everyone, I'm trying to solve a problem about how to get the Fisher's discriminant functions of a lda (linear discriminant analysis) object, I mean, the object obtained from doing lda(formula

Re: [R] standard error of variances and covariances of the random effects with LME

2005-09-29 Thread Kjetil Holuerson
Doran, Harold wrote: You cannot. Yes. But when it is really needed, as the original poster said, what would be wrong with taking the length of a 95% confidence interval and dividing into 4? (of course it will be wrong, but so much as to be useless?) Kjetil Also, it's

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

2005-09-22 Thread Kjetil Brinchmann Halvorsen
is the proportion of rejected null hypothesis which really are true nulls! To me FDR seems like a more promising avenue to multiple testing than the old familywise error rate. Who knows what is a family? Kjetil The definition of reasonably reliable FDRs would seem to relate to the status

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

2005-09-16 Thread Kjetil Brinchmann Halvorsen
people in the field who could not help me either. I would be interested in any references as well. http://bayes.wustl.edu/ where you can download Bretthorst's book Bayesian Spectrum Analysis and Parameter Estimation Kjetil On Friday 16 September 2005 10:36, you wrote: Sebastian

Re: [R] Multivariate Skew Normal distribution

2005-09-02 Thread Kjetil Brinchmann Halvorsen
by skewing a normal family, hence the name. You can also skew a t -family or whatever other symmetric family you like. I found this usefull for modelling. Kjetil presumably mean something different from what you said, so unless we understand this more clearly it is unlikely that anyone can make

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

2005-08-12 Thread Kjetil Brinchmann Halvorsen
with(test, test$c - 1:5) test a b 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 with(test, test$c - 1:5) test a b c 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 So what is the best style her? Kjetil I think too that the creation of the value can be vectorized simply, generalizing something like value

Re: [R] computationally singular

2005-08-10 Thread Kjetil Brinchmann Halvorsen
the zero variance linear combination(s) look at the nzero eigenvalues. Also, it *might* make sense to calculate a mahalanobis distance replacing the matrix inverse with a pseudoinverse. Kjetil weiwei On 8/8/05, Christian Hennig [EMAIL PROTECTED] wrote: Once I had a situation where the reason

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 r

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

2005-07-29 Thread Kjetil Brinchmann Halvorsen
@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html help.search(recurrent) leads to CRAN pakage survrec. You couls also have a look at CRAN package eha and at Lindsey's package event -- Kjetil

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

2005-07-10 Thread Kjetil Brinchmann Halvorsen
the best subset. If your goal is to discriminate between two different classes, why not calculate directly a measure of discriminative ability, such as probability of correct classification? Kjetil I read some on feature selection in text categorization (A comparative study on feature

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

2005-07-07 Thread Kjetil Brinchmann Halvorsen
between two populations. How can I do? I want to use chisquare, is is right for these data ? If you want to use chisquare, you need the counts and not only the proportions. If that is right can be answered only if we know your hypothesis. Kjetil can anyone help me ? Thanks!! luan Yellow

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

2005-07-06 Thread Kjetil Brinchmann Halvorsen
iterated until convergence of them both? (Does this converge?) Not sure about this at the moment. Or what else? What does rescaled mean? rescaled means multiplied with the constant which makes it a consistent estimator under the normal model, default in the R mad function Kjetil Thank

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

2005-06-24 Thread Kjetil Brinchmann Halvorsen
what cell contributes most to the overall chisquared. Kjetil Can I do this decomposition in R for the following example including 2 contingency tables? tab1-array(c(11266, 125, 2151526, 31734), dim=c(2,2)) tab1 [,1][,2] [1,] 11266 2151526 [2,] 125 31734 tab2-array

Re: [R] chisq test and fisher exact test

2005-06-22 Thread Kjetil Brinchmann Halvorsen
I should use here to evaluate the strength of association? odds ratio? Any suggestions are welcome! Thanks! You can use chisq.test with sim=TRUE, or call it as usual first, see if there is a warning, and then recall with sim=TRUE. Kjetil -- Kjetil Halvorsen. Peace is the most effective

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

2005-06-11 Thread Kjetil Brinchmann Halvorsen
0.003571163 2.61350.008962 ** TNF:IFN -0.58798 0.69162 -0.85010.395244 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Note different conclusions from the two last commands with respect to necessity of interaction term in model. Comments are welcome! Kjetil

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

2005-06-10 Thread Kjetil Brinchmann Halvorsen
( sum(x20), sum(x25), sum(x30))) Kjetil We have transferred the data to a more potent Linux box running R, but still hope to speed up the code. I know a for loop should be avoided when looking for speed. I also know the answer is in something like tapply, but my understanding of these commands

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

2005-06-08 Thread Kjetil Brinchmann Halvorsen
have equal seeds. I remember that I have read somewhere that destroying RNG flow over and over to get real randomness is not a good idea. Can someone confirm this? That's in Brian Ripley's Simulation book, and certainly in other places. Kjetil niter - 3 nchain - 2 for (i in 1:niter

Re: [R] R and MLE

2005-06-07 Thread Kjetil Brinchmann Halvorsen
go about doing this within R? Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing message. Checked by AVG Anti-Virus. __ R-help

Re: [R] function and apply

2005-06-05 Thread Kjetil Brinchmann Halvorsen
into the settings of your mail program! Kjetil I think my problem is not complicated but I'm having difficulties to solve it. v is a vector: v=c(p1 , p2 , p3 , p4), and f is a function: f : v - w , where w=c(p1 , p2*(1-p1) , p3*(1-p2)*(1-p1) , p4*(1-p3)*(1-p2)*(1-p1)) I

Re: [R] geometric mean regression

2005-06-03 Thread Kjetil Brinchmann Halvorsen
regression. Kjetil Emmanuel Poizot Cnam/Intechmer B.P. 324 50103 Cherbourg Cedex Phone (Direct) : (00 33)(0)233887342 Fax : (00 33)(0)233887339

Re: [R] Dynamic Dictionary Data Type?

2005-06-02 Thread Kjetil Brinchmann Halvorsen
(there is (at least) one problem with this solution: if the global workspace contains a variable `6`, it gives error. Why?) Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing message. Checked by AVG

Re: [R] Dynamic Dictionary Data Type?

2005-06-02 Thread Kjetil Brinchmann Halvorsen
NA NA Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing message. Checked by AVG Anti-Virus. __ R-help@stat.math.ethz.ch mailing list https

[R] Incompatibility with VGAM

2005-05-29 Thread Kjetil Brinchmann Halvorsen
a component $vfamily). I thought namespaces should protect us from this happening? Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing message. Checked by AVG Anti-Virus

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
! - Could the very high significance of the coefficients in the poisson model hint at some issue? Maybe that the model fits better than the normal? Kjetil Thanking you in advance, Costas +++ POISSON - LOG LINK +++ Call: glm(formula = TotalDeadInjured[3:48

Re: [R] Suppressing warning messages

2005-05-15 Thread Kjetil Brinchmann Halvorsen
! To assure you are uninformed, say options(warn=-1) Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing message. Checked by AVG Anti-Virus. __ R-help

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

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

2005-05-03 Thread Kjetil Brinchmann Halvorsen
. That will be difficult. Could'nt it do to prove it is better? Kjetil I also intend to use Weka, and for this one I have the same problem. Can anyone help me? Thanks René M. Raupp e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] [[alternative HTML version deleted

Re: [R] Roots of quadratic system.

2005-05-01 Thread Kjetil Brinchmann Halvorsen
go for a computer algebra system with an implemantation of groebner basis, and use an symbolic method. Kjetil Note that I am not opimizing, but rather solving the first order conditions which come from a Hamiltonian. I am basically looking for something in R that will do the same thing as fsolve

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

2005-04-29 Thread Kjetil Brinchmann Halvorsen
the two first in the list above. Could it be this (which should be allowed, is mentioned in writing R extensions) or is it something else, or a bug? Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing

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

2005-04-16 Thread Kjetil Brinchmann Halvorsen
correlations are zero. Anybody knows how good this approximation is, and how dependent on multivariate normality? Kjetil 3,if not,is it under-developed or there is not need to do it?or there is no good way to do it? i hope my question is not too silly

Re: [R] Data set for loglinear analysis

2005-04-04 Thread Kjetil Brinchmann Halvorsen
]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Do data(package=datasets) and look. maybe data(UCBAdmissions) Kjetil -- Kjetil Halvorsen

Re: [R] custom loss function + nonlinear models

2005-04-04 Thread Kjetil Brinchmann Halvorsen
estimates? Thanks Christian __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html try directly with optim() Kjetil -- Kjetil Halvorsen. Peace

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

2005-04-03 Thread Kjetil Brinchmann Halvorsen
. -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

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

2005-03-27 Thread Kjetil Brinchmann Halvorsen
in following standard terminology.) By the way, ordinal does not compile under rw2010dev. Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing message. Checked by AVG Anti-Virus

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
: Min 1Q Median 3Q Max -2.8513 -0.3955 0.2815 0.5939 1.2475 Coefficients: Estimate Std. Error t value Pr(|t|) [1,] -0.1999 0.1620 -1.2340.227 Residual standard error: 0.8872 on 29 degrees of freedom Sorry for not being of more help! Kjetil -- Kjetil Halvorsen. Peace

  1   2   3   4   >