Re: [R] Bug in predict.lm?

2013-11-16 Thread peter dalgaard
gt; So predict.lm finds it and is.null(w) is FALSE. > > Mea culpa! Hmm, maybe, but this is the sort of thing that code analysis tries to catch (as in "no visible binding for global variable 'w'"). Apparently, the code checker is not smart enough to detect cases where a

Re: [R] Double Pareto Log Normal Distribution

2013-11-12 Thread peter dalgaard
p > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg

Re: [R] Optimization failed in fitdistr (Weibull distribution)

2013-10-30 Thread peter dalgaard
On 29 Oct 2013, at 21:35 , Rolf Turner wrote: > On 10/29/13 19:44, peter dalgaard wrote: > > > >> There really is no substitute for knowledge and understanding! Did it not >> occur to you that the Windspeed column needs to enter into your analysis? > >

Re: [R] R vs octave development strategy (and success)

2013-10-29 Thread peter dalgaard
> Best > > F > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-cont

Re: [R] Optimization failed in fitdistr (Weibull distribution)

2013-10-28 Thread peter dalgaard
context: > http://r.789695.n4.nabble.com/Optimization-failed-in-fitdistr-Weibull-distribution-tp4679167.html > Sent from the R help mailing list archive at Nabble.com. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/ma

Re: [R] Nonparametric k-way ANOVA

2013-10-24 Thread peter dalgaard
_ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard

Re: [R] How to view un-sampled data from a randomly sampled dataset

2013-10-23 Thread peter dalgaard
ere's also the option of a logical index: N <- nrow(data) n <- 40 ix <- sample(rep(c(TRUE,FALSE), c(n, N-n))) y <- data[ix,] x <- data[!ix,] > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > > >> -Original Message----- >> From: r

Re: [R] Where is element 30?

2013-10-23 Thread peter dalgaard
On Oct 23, 2013, at 20:04 , MacQueen, Don wrote: > Follow these examples: > >> grep(5,1:10) > [1] 5 > >> grep(3, c(1,5,2,3,6)) > [1] 4 > > Don't: > grep(5,1:15) [1] 5 15 -pd -- Peter Dalgaard, Professor, Center for Statistics, Copenhag

Re: [R] How to view un-sampled data from a randomly sampled dataset

2013-10-23 Thread peter dalgaard
__ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Profe

Re: [R] Function not working as I'd like

2013-10-23 Thread peter dalgaard
e > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible > code. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the

Re: [R] Recovering object names when using the ... argument in a fn XXXX

2013-10-21 Thread peter dalgaard
extract the original object >>>> names that were fed to the fn? >>>> >>>> Thanks, >>>> >>>> Dan >>>> >>>> [[alternative HTML version deleted]] >>>> >>>> _

Re: [R] dmvnorm returns NaN

2013-10-18 Thread peter dalgaard
>> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > David Winsemius > A

Re: [R] new dprep package for windows

2013-10-16 Thread peter dalgaard
gt; PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, D

Re: [R] Is there something wrong with R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"?

2013-10-16 Thread peter dalgaard
p://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com

Re: [R] Finding solution for non-linear equations

2013-10-16 Thread peter dalgaard
t; A <- .01 > B <- (pnorm(Y1+A)-0.05)/(pnorm(Y1+A)-pnorm(Y1-A)) > B*(pnorm(Y1-A))+(1-B)*pnorm(Y1+A) [1] 0.05 > B*(pnorm(Y2-A))+(1-B)*pnorm(Y2+A) [1] 0.0191 > B*(pnorm(Y2+.001-A))+(1-B)*pnorm(Y2+.001+A) [1] 0.01002759 Notice that we can get the first equation satisfied exactly

Re: [R] using a variable for a column name in a formula

2013-10-14 Thread peter dalgaard
t; > > -- > Sarah Goslee > http://www.functionaldiversity.org > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html &

Re: [R] order() not producing results as I expect

2013-10-11 Thread peter dalgaard
gt; PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help &g

Re: [R] mixed model MANOVA? does it even exist?

2013-10-09 Thread peter dalgaard
ternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal

Re: [R] FW: Transposing the output of 'table'

2013-10-07 Thread peter dalgaard
idential, and exempt from disclosure > under applicable law. Should the reader of this message not be the intended > recipient(s), you are hereby notified that any dissemination, distribution, > or copying of this communication is strictly prohibited. If you are not > the intended recipient, please contact the sender by repl

Re: [R] quote a column of a dataframe by its name

2013-10-05 Thread peter dalgaard
g the question in the Subject field? (No-one intended to use it in production code. The mystery is that it - reportedly - threw an error for the original poster, but not for anyone else.) -pd -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederi

Re: [R] Why 'gbm' is not giving me error when I change the response from numeric to categorical?

2013-10-04 Thread peter dalgaard
On Oct 4, 2013, at 21:16 , Mary Kindall wrote: > Y[Y < mean(Y)] = 0 #My edit > Y[Y >= mean(Y)] = 1 #My edit I have no clue about gbm, but I don't think the above does what I think you think it does. Y <- as.integer(Y >= mean(Y)) might be closer to the ma

Re: [R] prcomp - surprising structure

2013-10-04 Thread peter dalgaard
icitly requiring Hardy-Weinberg > > equilibrium, so if your data are all 0 or 2 (aa or AA) there will be > > overdispersion. > > This is a good point. But why do find such effects in the "middle" of my data? > > Thanks > Hermann > > > > > 2

Re: [R] prcomp - surprising structure

2013-10-03 Thread peter dalgaard
mat[,i] <- ui > } >mat <- prcomp (mat) >return (mat) > } > ______ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http:

Re: [R] Command line r

2013-10-02 Thread peter dalgaard
code. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible

Re: [R] Error for atomic vectors and integers issue

2013-09-29 Thread peter dalgaard
a lot, > Guy > > > > > > > > -- > Guy Wachsman > Benfey lab, FFSC #4131, Duke > 130 Science Drive > 27708, Durham, NC > email: g...@duke.edu > > > [[alternative HTML version deleted]] > > ______ > R-help@r-project.org mailing list >

[R] R 3.0.2 is released

2013-09-25 Thread Peter Dalgaard
Binaries for various platforms will appear in due course. For the R Core Team Peter Dalgaard These are the md5sums for the freshly created files, in case you wish to check that they are uncorrupted: MD5 (AUTHORS) = cbf6da8f886ccd8d0dda0cc7ffd1b8ec MD5 (COPYING) = eb723b61539feef013de476e68

Re: [R] xlim with barplot

2013-09-23 Thread peter dalgaard
not present in data, which is usually not desirable if the magnitude of the values matters. It gets a bit awkward if there are nonpositive (or very large) values, though. A better solution could be table(factor(x, levels=35:85)). -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen

Re: [R] "With" question

2013-09-18 Thread peter dalgaard
r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > __ > R-help@r-project.org mailing list > https://stat.ethz

Re: [R] RStudio Server init script

2013-09-11 Thread peter dalgaard
On Sep 11, 2013, at 07:53 , Bembi Prima wrote: > I have seen ?Startup and already update .RProfile in home folder, but as I > already said it just affected user's Rprofile, not the global one. So you didn't read the parts about Rprofile.site? -- Peter Dalgaard, Professor Cente

Re: [R] assigning the class of an object

2013-09-11 Thread peter dalgaard
; > [1] 42 > attr(,"class") > [1] "myClass" > > (also got the familiar error message). > > When I did it your way --- without the saving and loading bit --- I got > the same result that you did. I.e. assigning the class that way did *not* > w

Re: [R] ifelse question (I'm not sure why this is working)...

2013-09-10 Thread peter dalgaard
for thinking about that case is up in the air, I think. He/she may have failed to grasp the meaning of integer(0).) > > Jim > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do

Re: [R] assigning the class of an object

2013-09-10 Thread peter dalgaard
rks* despite the error message!!! > That is, you wind up with an object, named by obj_name, with class "myClass". > I don't understand this. Perhaps > someone more knowledgeable than I will enlighten us both. It certainly won't work universally: > x <- 5 >

Re: [R] Need Help

2013-09-08 Thread peter dalgaard
;Nome""Miami" "Raleigh" [[2]] [1] "AK" "FL" "NC" [[3]] [1] 2.50 6.75 NA [[4]] [1] 15 18 12 > names(l) <- c("city","state","normalRain","meanDaysRain") > as.data.frame(l) ci

Re: [R] Use of parantheses to force order of execution

2013-09-08 Thread peter dalgaard
. You can do it in one long > line with a dataframe using lapply, but it is ugly: > > df <- as.data.frame( lapply(BWS6, function(col) ifelse(col < -998, NA, col))) > > Duncan Murdoch > > __ > R-help@r-project.org mailing list > https://stat.eth

Re: [R] probability of occurrence of an event and the probabilityof anevent upon the occurrence of another event

2013-09-06 Thread peter dalgaard
-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Professor Center for Statistics, Copenhage

Re: [R] spacing problem in main title using car package scatterplot

2013-08-30 Thread peter dalgaard
, >> main=bquote(paste("Hypothesis 9.4.1\nBaseline XYZ with Disease >> Activity (DAS28)\nat Month 18 (N=",.(ss),")")), >> xlab="Baseline XYZ", >> ylab="Month 18 DAS28", >> legend.plot=F) >> >> _______

Re: [R] return the name of source.

2013-08-26 Thread peter dalgaard
ilman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg,

[R] R-3.0.2 on September 25

2013-08-21 Thread peter dalgaard
ended packages should be finalized 14 days before release. For the R Core Team Peter Dalgaard -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmai

Re: [R] data import: strange experience

2013-08-21 Thread peter dalgaard
> Since there was no errors in importing the file into R, I do not have an >> idea where to start to fix it. Do you have any suggestion? >> >> Thank you very much in advance, >> >> SH >> > > -- > Sarah Goslee > http://www.functionaldiversity.org > > ___

Re: [R] How to apply a function to every element of a dataframe, when the function uses for each colummn and row different values to calculate with?

2013-08-20 Thread peter dalgaard
the Yates correction is towards zero. (a few lines above, we have YATES <- min(0.5, abs(x - E)) which avoids the embarrassment of a positive chi-square when x==E). If YATES==0, he squaring of course makes abs() superfluous. -- Peter Dalgaard, Professor, Center for Statistics,

Re: [R] How to extract last value in each group

2013-08-14 Thread peter dalgaard
136.75 136.80 136.75 136.80 1 2 >>>> 06/02/2010 338 136.80 136.80 136.80 136.80 3 0 >>>> __ >>>> R-help@r-project.org mailing list >>>> https://stat.ethz.ch/mailman/listinfo/r-help >>>>

Re: [R] Automatic formula creation

2013-08-09 Thread peter dalgaard
se in example(Reduce)? -pd > Alex > On 08/09/2013 04:00 PM, peter dalgaard wrote: >> On Aug 9, 2013, at 13:26 , Rui Barradas wrote: >> >>> Hello, >>> >>> Maybe the following gives you some idea on how to vary the terms. >>> >

Re: [R] Automatic formula creation

2013-08-09 Thread peter dalgaard
;log10(', combs[ic, jc], ')', sep = '') >> terms <- append(terms, t) >> } >> >> ftext <- paste(terms[1], terms[2], terms[3], terms[4], terms[5], >> sep = ' * ') >> >> ftext <- paste('I(1 - Pass149) ~ &#

Re: [R] Kolmogorov-Smirnov Test

2013-08-02 Thread peter dalgaard
" is not a graphical parameter > 6: "horizontals" is not a graphical parameter > 7: In ks.test(compare[, 1], compare[, 2]) : > cannot compute correct p-values with ties > [[alternative HTML version deleted]] > > __

Re: [R] Error Help: duplicate?

2013-08-01 Thread peter dalgaard
.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://ww

Re: [R] Declare BASH Array Using R System Function

2013-07-29 Thread peter dalgaard
osting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-proj

Re: [R] Boxcox transformation error

2013-07-28 Thread peter dalgaard
el("prueba35r") > rs<-sqlFetch(temp,"Hoja1") > close(temp) > fix(rs) > boxcox(rs$"Ec30") > > Thaks a lot for your help. The most obvious guess is that "rs" isn't what you think it should be, so how about showing us the result of s

Re: [R] BH correction with p.adjust

2013-07-21 Thread peter dalgaard
gt; 0.05030589 >>> >>> pList[1]*nrow(hypTable)/1 >> cg27433479 >> 0.09269194 >> > > No data provided, so unable to pursue this further. > >> I tried to recreate this is a small example of a vector of 5 p values but >> everything worked as ex

Re: [R] readLines() problem-error

2013-07-12 Thread peter dalgaard
> R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Professor Center for Statistic

Re: [R] Fwd: Error in read.table

2013-07-11 Thread peter dalgaard
adings that go with the file e.g.: > filenames<-list.files(pattern="*.csv") > for (i in seq_along(filenames)) { > con<-read.csv(filenames[i], headers=TRUE, sep=',') > } > > Regards > Jannetta > > > On 11 July 2013 13:27, peter dalgaard wro

Re: [R] Error in read.table

2013-07-11 Thread peter dalgaard
info/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > > > -- > ÕÅêÊ Dante.py > Ö‹É∏´óѧ09π¶Ê‡Ñ§ÓëÓœÓÃʇѧ◊¨Òµ > ¸öÈËÖ÷Ò“£ºhttp://dant

Re: [R] find 2D corelation coefficient

2013-07-10 Thread peter dalgaard
sional corelation coefficient-2D corelation between (x,y) and >> (x1,y1) where x and x1 are same. >> >> >> On Tue, Jul 9, 2013 at 2:27 PM, peter dalgaard wrote: >> >>> >>> On Jul 9, 2013, at 07:30 , smriti Sebastian wrote: >>> >>>>

Re: [R] regular expression strikes again

2013-07-09 Thread peter dalgaard
"pH4,8 1" "pH4,8 2" "pH4,8 3" "pH4,12 1" "9,36" "9,36" > [13] "9,66" "9,66" "9,66" "10,04""10,04""10,04" > [19] "6,13" "6,1

Re: [R] regular expression strikes again

2013-07-09 Thread peter dalgaard
;9,36" "9,36" "9,66" "9,66" "9,66" "0,04" "0,04" "0,04" "6,13" "6,13" > [11] "6,13" > > but with 10,04 values instead of 0,04. > > I tried > gsub("^.*([[:digit:]]+,[[:digit:]]*

Re: [R] find 2D corelation coefficient

2013-07-09 Thread peter dalgaard
On Jul 9, 2013, at 07:30 , smriti Sebastian wrote: > I need to find the 2d corelation betwee two datasets which are having > common x-values.Is there any way to find 2D corelation in R? If you can tell us what the definition is -- Peter Dalgaard, Professor Center for Stat

Re: [R] kruskal.test followed by kruskalmc

2013-07-05 Thread peter dalgaard
m each other. > I'm afraid it can't be done. You really can be in a situation where you reject the global null hypothesis that all groups are the same, yet cannot point out any two groups that differ from eachother. -pd > Regards, Humber > > > On Fri, Jul 5, 2013 a

Re: [R] kruskal.test followed by kruskalmc

2013-07-05 Thread peter dalgaard
ed with >> Help the Aged in these nations to form three registered charities: >> Age Scotland, Age NI, Age Cymru. >> >> >> >> >> > > > -- > Humber Agrelli Andrade > Universidade Federal Rural de Pernambuco - UFRPE > Depto. Pesc

Re: [R] g2 test...

2013-07-05 Thread peter dalgaard
sponses (e.g. 2 by 2 table) instead of the McNemar test? > > [snip] > > Not an R question. Try http://stats.stackexchange.com instead? It probably has a no-homework rule too, though -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3,

Re: [R] R and MatLab implementations of the same model differs

2013-07-04 Thread peter dalgaard
gards > Jannetta > > > -- > > === > Web site: http://www.jannetta.com > Email: janne...@henning.org > === > > [[alternative HTML version deleted]] > > __

Re: [R] R and MatLab implementations of the same model differs

2013-07-04 Thread peter dalgaard
On Jul 4, 2013, at 20:14 , Berend Hasselman wrote: > > On 04-07-2013, at 19:56, peter dalgaard wrote: > >> >> On Jul 4, 2013, at 19:11 , Berend Hasselman wrote: >> >>> >>> On 04-07-2013, at 18:42, Jannetta Steyn wrote: >>> >&

Re: [R] R and MatLab implementations of the same model differs

2013-07-04 Thread peter dalgaard
t; https://stat.ethz.ch/mailman/listinfo/r-help >>> PLEASE do read the posting guide >>> http://www.R-project.org/posting-guide.html >>> and provide commented, minimal, self-contained, reproducible code. >>> >> >> >> >> -- >> >

Re: [R] polr?

2013-07-04 Thread peter dalgaard
stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 > >

Re: [R] Multinomial model and p-values

2013-07-03 Thread peter dalgaard
0.005216581 0.02352202 > 0.0035612114 > > I AM NOT a statistician, so don't be baffled by a silly question! I this > procedure correct? There's at least a factor of 2 missing for a two-tailed p value. It is usually a mistake to use the t-distribution for wh

Re: [R] Empty pdf

2013-07-01 Thread peter dalgaard
he two with respect to pdf plotting? Same as on the command line: If you type quartz() (or whatever is the default device for you), you get an empty window if no plotting follows. If you type plot(0:9), the quartz() device is opened for you and plotted into. You could try options(device=pdf) sourc

Re: [R] Lexical scoping is not what I expect

2013-07-01 Thread peter dalgaard
ttp://www.R-project.org/** >>> posting-guide.html <http://www.R-project.org/posting-guide.html> >>> and provide commented, minimal, self-contained, reproducible code. >>> >> >> >> > > __ > R-he

Re: [R] Transforming boolean subsetting into index subsetting

2013-06-28 Thread peter dalgaard
a for() loop collecting the > indexes, I just wonder if such an operation can be avoided. > which(I) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmai

Re: [R] Ifelse leading to inconsistent result

2013-06-26 Thread peter dalgaard
ountProf should sum to less than the number of interations. > When I troubleshoot by reducing the number of iterations and that size of the > logprice, I can't reproduce the contradicion. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listi

Re: [R] Psych package: Error in biplot.psych(sample.mod) : Biplot requires factor/component scores:

2013-06-26 Thread peter dalgaard
ps://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen B

Re: [R] Heatmap with error message: `x' must be a numeric matrix

2013-06-26 Thread peter dalgaard
e(...etc..., dec = ",") > > > Or you can replace the commas with periods: > Or use read.delim2(). That is what it is for. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+

Re: [R] Wilcox paired test error message

2013-06-24 Thread peter dalgaard
On Jun 24, 2013, at 15:21 , Sarah Goslee wrote: > G'morning. > > On Mon, Jun 24, 2013 at 2:22 AM, peter dalgaard wrote: >> >> On Jun 23, 2013, at 22:30 , Sarah Goslee wrote: >> >>> Hi, >>> >>> If you're doing exactly a

Re: [R] Wilcox paired test error message

2013-06-23 Thread peter dalgaard
g to find the answer. >> Please can somebody tell me how to make it work >> thanks >> > > -- > Sarah Goslee > http://www.functionaldiversity.org > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailm

Re: [R] How to make a test for linearity of a Passing-Bablok Regression

2013-06-21 Thread peter dalgaard
ic at best), the cusum test is equivalent to a two-sample Kolmogorov-Smirnov test, so you should be able to either use ks.test as is, or, with the appropriate scaling, feed the max(abs(cusum)) to pkstwo (which can be lifted from the sources of ks.test). -- Peter Dalgaard, Professor Center

Re: [R] p values of lmer

2013-06-20 Thread peter dalgaard
sues are unresolved". Important developments have happened since, and Rune's reference to package lmerTest (and, implicitly, pbkrtest) is more precise these days. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denm

Re: [R] how to get growth rate of a (time series) data?

2013-06-20 Thread peter dalgaard
osed to be ... Oh, wait.... .-) -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-help@r-project.org m

Re: [R] chi square test

2013-06-17 Thread peter dalgaard
et the results of individual cells? > > What do you mean 'results of individual cells'? As documented in > ?chisq.test, you might be looking for one or more of > > data.table$observed > data.table$expected > data.table$residuals > data.table$stdres > > Pic

Re: [R] change factor to mtrix

2013-06-12 Thread peter dalgaard
___ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Profe

Re: [R] QR factorization for aov

2013-06-12 Thread peter dalgaard
g list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solb

Re: [R] Clogit R and Stata

2013-06-08 Thread peter dalgaard
glb_ind=="Y") On Jun 7, 2013, at 18:51 , Richard Beckett wrote: > > > From: peter dalgaard > To: Richard Beckett > Cc: "r-help@r-project.org" > Sent: Friday, June 7, 2013 11:12 AM > Subject: Re: [R] Clogit R and Stata > > Here is the R output:

Re: [R] Clogit R and Stata

2013-06-07 Thread peter dalgaard
> but got different results > What did I do wrong here? I interpreted the STATA clogit as run this logit as > long as the sample is 1 and glb_ind="Y" What should I be doing instead? An "&" rather than "|" in the R version might help. Other than that, we

Re: [R] SPlus script

2013-06-05 Thread peter dalgaard
ne >> } >> >> ne2 _ ne >> ne _ (ne1+ne2)/2 >> #cat(ccc*ne) >> Ep1_Epower(nc, d, ne, pc, alpha) >> return(ne=ne, Ep=Ep1) >> } >> ### >> vertex _ function(x,y) >> { n _ length(x) >> vx _ x[1] >> vy

Re: [R] Why do tabs disappear when pasted into the R console?

2013-06-03 Thread peter dalgaard
Editor. >> >> >> With regards, >> Tal > > > -- > Sarah Goslee > http://www.functionaldiversity.org > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do

Re: [R] Computing Median for Subset of Data

2013-06-02 Thread peter dalgaard
do things like this, run summary(subset_1) to check.) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-he

Re: [R] How to compute a P-value for a complex mixture of chi-squared distributions in R

2013-06-01 Thread peter dalgaard
pchisq(x^2, 2) ??? -pd > > > All the best, > > Tiago > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-co

Re: [R] R: Equivalence between lm and glm

2013-05-31 Thread peter dalgaard
og(Y) ~ X) > the regression is > exp(mu+(1/2)*sigma^2) = beta0 + beta1*X. > Correct? Probably not. (What is mu? If it is E(log(Y)), then it should just be just mu=beta0+beta1*X) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Fred

Re: [R] Equivalence between lm and glm

2013-05-29 Thread peter dalgaard
ink=log)) > is not equivalent? Y is assumed lognormal in one case, normal in the other. > Is there an equivalent glm to lm(log(Y) ~ X)? > Yes, glm(log(Y) ~ X, family=gaussian(link=identity)) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg

Re: [R] (no subject)

2013-05-29 Thread peter dalgaard
tributing to the (no subject) thread, which on my machine brings up a couple of hundred messages from the last three years... -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email:

Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread peter dalgaard
x27;s pretty typical behavior for terminals (real and emulated). > > Can it be that the paste mechanism i'm using (from GEdit to GNOME terminal > on Ubuntu Linux) is adding control characters between pasting multiple > blocks of code and these (invisible) characters are causing the

Re: [R] Trouble with arguments to 'order'

2013-05-27 Thread peter dalgaard
stant 1. You need to spell out your intentions: order(indata[[parameters$ItemColumn]], indata[[parameters$PriceColumn]]) or maybe do.call("order", indata[unlist(parameters[c("ItemColumn","PriceColumn")])]) (both untested) -- Peter Dalga

Re: [R] How I can rearrange columns in data.frame?

2013-05-27 Thread peter dalgaard
4L)) > Any suggestions. > KG Is there a particular logic to that ordering? Otherwise, the obvious way is nm <- c("preV15A1b", "preV59A1b", "preV1001A1b", "preV2032A1b", "preV2035A1b") dat1 <- dat[nm] Or, maybe you are looking for som

Re: [R] Create and read symbolic links in Windows

2013-05-25 Thread peter dalgaard
quot;.file1", file2, : >>> cannot link './File1' to './file2', reason 'The specified network >>> name is >>> no longer available' >> >> Same here, > > Nonsense, I meant to write "Works here" or some such

Re: [R] sample(c(0, 1)...) vs. rbinom

2013-05-22 Thread peter dalgaard
_COLLATE=en_US.UTF-8 >> [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8 >> [7] LC_PAPER=C LC_NAME=C >> [9] LC_ADDRESS=C LC_TELEPHONE=C >> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

Re: [R] problem with "transform" and "get" functions

2013-05-21 Thread peter dalgaard
s and therefore syntactically cannot be expressions. The within() function allows full assignment syntax. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email

Re: [R] apply and table

2013-05-19 Thread peter dalgaard
A B C A 1 0 0 B 0 1 0 C 0 0 1 > > Another question: how to output the table in squared matrix (or data frame)? > For example: > > > table(c("C", "B", "B"), c("A", "B", "C")) > >A B C >

Re: [R] strange behaviour with loops and lists

2013-05-19 Thread peter dalgaard
LL [[2]] [1] 123 $`2` [1] 321 In both cases, x will be extended if needed, so that the required element exists. Notice that there is no relation between the name and the number of a list element; e.g., x[["2"]] is the 3rd element in the above example. -- Peter Dalgaard, Professor, Cen

Re: [R] Selecting A List of Columns

2013-05-17 Thread peter dalgaard
ohn J. Sparks, Ph.D. > > ______ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, re

Re: [R] Selecting A List of Columns

2013-05-17 Thread peter dalgaard
On May 17, 2013, at 12:02 , peter dalgaard wrote: > > On May 17, 2013, at 08:51 , Sparks, John James wrote: > >> Dear R Helpers, >> >> I need help with a slightly unusual situation in which I am trying to >> select some columns from a data frame. I know h

Re: [R] convert a data.frame to matrix

2013-05-16 Thread peter dalgaard
ansform jam to m? > > jam <- structure(list(vec1 = 172L, vec3 = 173L, d1 = 223L, d2 = 356L), .Names > = > c("vec1", > "vec3", "d1", "d2"), row.names = 1L, class = "data.frame") > jm <- data.matrix(jam) > dim(jm) <-

Re: [R] Chi square 1 d.f.

2013-05-16 Thread peter dalgaard
; R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Professor, Center for Statistics, Copen

[R] R 3.0.1 is released

2013-05-16 Thread Peter Dalgaard
naries for various platforms will appear in due course. For the R Core Team Peter Dalgaard These are the md5sums for the freshly created files, in case you wish to check that they are uncorrupted: MD5 (AUTHORS) = cbf6da8f886ccd8d0dda0cc7ffd1b8ec MD5 (COPYING) = eb723b61539feef013de476e68

Re: [R] Post hoc test for GLM with poisson distribution

2013-05-14 Thread peter dalgaard
-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Peter Dalgaard, Profe

<    5   6   7   8   9   10   11   12   13   14   >