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

2013-10-23 Thread peter dalgaard
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, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv

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, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark

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

2013-10-23 Thread peter dalgaard
), c(n, N-n))) y - data[ix,] x - data[!ix,] Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of peter dalgaard Sent: Wednesday, October 23, 2013 12:37 PM To: erinu Cc

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

2013-10-21 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] dmvnorm returns NaN

2013-10-18 Thread peter dalgaard
/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 Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone

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

2013-10-16 Thread peter dalgaard
] 0.01002759 Notice that we can get the first equation satisfied exactly, but then the 2nd one overshoots by an amount which is increasing in Y2. We could fix that by decreasing Y2 but that violates the constraint. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School

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

2013-10-16 Thread 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...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] new dprep package for windows

2013-10-16 Thread peter dalgaard
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] using a variable for a column name in a formula

2013-10-14 Thread peter dalgaard
://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] order() not producing results as I expect

2013-10-11 Thread peter dalgaard
/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, Denmark Phone: (+45

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

2013-10-09 Thread peter dalgaard
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, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda

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

2013-10-07 Thread peter dalgaard
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, Denmark Phone: (+45)38153501 Email: pd@cbs.dk

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

2013-10-05 Thread peter dalgaard
? (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 Frederiksberg, Denmark Phone: (+45

Re: [R] prcomp - surprising structure

2013-10-04 Thread peter dalgaard
) there will be overdispersion. This is a good point. But why do find such effects in the middle of my data? Thanks Hermann 2013/10/3 peter dalgaard pda...@gmail.com It's not so obvious to me that this is an artifact. What prcomp() says is that some of the eigenvectors have a lot of activity in some

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 mark. -- Peter Dalgaard, Professor

Re: [R] prcomp - surprising structure

2013-10-03 Thread peter dalgaard
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] Command line r

2013-10-02 Thread peter dalgaard
-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] Error for atomic vectors and integers issue

2013-09-29 Thread peter dalgaard
://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 Solbjerg Plads 3, 2000 Frederiksberg, Denmark

[R] R 3.0.2 is released

2013-09-25 Thread Peter Dalgaard
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) = eb723b61539feef013de476e68b5c50a MD5

Re: [R] xlim with barplot

2013-09-23 Thread peter dalgaard
, 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 Business School

Re: [R] With question

2013-09-18 Thread peter dalgaard
-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] assigning the class of an object

2013-09-11 Thread peter dalgaard
way --- without the saving and loading bit --- I got the same result that you did. I.e. assigning the class that way did *not* work (as one would expect it wouldn't!). This is weird, n'est-ce pas? A bug, I'm pretty sure. -p -- Peter Dalgaard, Professor Center for Statistics, Copenhagen

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 Center for Statistics

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

2013-09-08 Thread peter dalgaard
://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 Solbjerg Plads 3, 2000

Re: [R] Need Help

2013-09-08 Thread peter dalgaard
) as.data.frame(l) city state normalRain meanDaysRain 1NomeAK 2.50 15 2 MiamiFL 6.75 18 3 RaleighNC NA 12 (or use a named list for the what= argument) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School

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

2013-09-06 Thread peter dalgaard
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 __ R

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

2013-08-30 Thread peter dalgaard
-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] return the name of source.

2013-08-27 Thread peter dalgaard
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 __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] R-3.0.2 on September 25

2013-08-22 Thread peter dalgaard
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...@gmail.com

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-21 Thread peter dalgaard
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, Copenhagen Business School Solbjerg

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

2013-08-15 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

Re: [R] Automatic formula creation

2013-08-09 Thread peter dalgaard
://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] Automatic formula creation

2013-08-09 Thread peter dalgaard
)? -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. idx - 1:5 # or any other indexes ftext - paste(terms[idx], collapse = ' * ') You're not the first to use

Re: [R] Kolmogorov-Smirnov Test

2013-08-02 Thread peter dalgaard
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, Denmark Phone: (+45)38153501

Re: [R] Error Help: duplicate?

2013-08-01 Thread peter dalgaard
, 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 __ R-help@r

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

2013-07-29 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

Re: [R] Boxcox transformation error

2013-07-28 Thread peter dalgaard
. The most obvious guess is that rs isn't what you think it should be, so how about showing us the result of str(rs)? -pd -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda

Re: [R] BH correction with p.adjust

2013-07-21 Thread peter dalgaard
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 __ R-help

Re: [R] readLines() problem-error

2013-07-12 Thread peter dalgaard
/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] Error in read.table

2013-07-11 Thread peter dalgaard
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, self-contained, reproducible code. -- Peter

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

2013-07-11 Thread peter dalgaard
(filenames[i], headers=TRUE, sep=',') } Regards Jannetta On 11 July 2013 13:27, peter dalgaard pda...@gmail.com wrote: On Jul 11, 2013, at 13:50 , Dante.py wrote: Maybe you should set parameter as.is in read.csv to be false. TRUE more likely... However, there's another issue

Re: [R] find 2D corelation coefficient

2013-07-10 Thread peter dalgaard
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 pda...@gmail.com wrote: 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

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 Statistics, Copenhagen

Re: [R] regular expression strikes again

2013-07-09 Thread peter dalgaard
success. Presumably the ^.* is too greedy. Perhaps add a space? I.e., gsub(^.* ([[:di.. -- 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] regular expression strikes again

2013-07-09 Thread peter dalgaard
] 6,13 6,13 6,13 -- 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 mailing list https

Re: [R] g2 test...

2013-07-05 Thread peter dalgaard
) 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, 2000 Frederiksberg, Denmark Phone: (+45

Re: [R] kruskal.test followed by kruskalmc

2013-07-05 Thread peter dalgaard
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 __ R

Re: [R] kruskal.test followed by kruskalmc

2013-07-05 Thread peter dalgaard
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 at 11:04 AM, peter dalgaard pda...@gmail.com wrote

Re: [R] polr?

2013-07-04 Thread peter dalgaard
://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 Solbjerg Plads 3, 2000 Frederiksberg

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

2013-07-04 Thread peter dalgaard
, 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 __ R-help@r-project.org mailing list https

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 pda...@gmail.com wrote: On Jul 4, 2013, at 19:11 , Berend Hasselman wrote: On 04-07-2013, at 18:42, Jannetta Steyn janne...@henning.org wrote: Hi Ben and others I don't quite know how

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

2013-07-04 Thread peter dalgaard
, 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 __ R-help@r

Re: [R] Multinomial model and p-values

2013-07-03 Thread peter dalgaard
, and you obviously know where to find stackexchange... (local, professional advice would be even better, though.) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda

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

2013-07-01 Thread peter dalgaard
://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 Solbjerg Plads 3, 2000

Re: [R] Empty pdf

2013-07-01 Thread peter dalgaard
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) source(script.R) q(save=no) -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads

Re: [R] Transforming boolean subsetting into index subsetting

2013-06-28 Thread peter dalgaard
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...@gmail.com __ R-help@r-project.org

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

2013-06-26 Thread peter dalgaard
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: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com

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

2013-06-26 Thread peter dalgaard
, 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 __ R-help@r-project.org

Re: [R] Ifelse leading to inconsistent result

2013-06-26 Thread peter dalgaard
://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 Solbjerg Plads 3, 2000 Frederiksberg

Re: [R] Wilcox paired test error message

2013-06-24 Thread peter dalgaard
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, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda

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 pda...@gmail.com wrote: On Jun 23, 2013, at 22:30 , Sarah Goslee wrote: Hi, If you're doing exactly as described below, then you need to add the data argument to wilcox.test

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

2013-06-21 Thread peter dalgaard
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 for Statistics, Copenhagen Business

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

2013-06-20 Thread 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...@gmail.com __ R-help@r-project.org mailing list https

Re: [R] p values of lmer

2013-06-20 Thread 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...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] chi square test

2013-06-17 Thread peter dalgaard
might be looking for one or more of data.table$observed data.table$expected data.table$residuals data.table$stdres Pick your poison. ;-) MW Replace with chisq.test(data.table)$observed, etc. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads

Re: [R] QR factorization for aov

2013-06-12 Thread peter dalgaard
://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] change factor to mtrix

2013-06-12 Thread peter dalgaard
, 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 __ R-help@r

Re: [R] Clogit R and Stata

2013-06-08 Thread peter dalgaard
, at 18:51 , Richard Beckett wrote: From: peter dalgaard pda...@gmail.com To: Richard Beckett rbecket...@yahoo.com Cc: r-help@r-project.org 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: Call: coxph(formula = Surv

Re: [R] Clogit R and Stata

2013-06-07 Thread peter dalgaard
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 a bit short on clues unless you provide some output. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3

Re: [R] SPlus script

2013-06-05 Thread peter dalgaard
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 __ R-help@r

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

2013-06-03 Thread peter dalgaard
://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] Computing Median for Subset of Data

2013-06-02 Thread peter dalgaard
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-help@r-project.org mailing list

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

2013-06-01 Thread peter dalgaard
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, Copenhagen Business School Solbjerg Plads

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

2013-05-31 Thread peter dalgaard
*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 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda

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

2013-05-29 Thread peter dalgaard
(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 problem? -- Peter Dalgaard, Professor, Center for Statistics

Re: [R] (no subject)

2013-05-29 Thread peter dalgaard
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: pd@cbs.dk Priv: pda...@gmail.com

Re: [R] Equivalence between lm and glm

2013-05-29 Thread peter dalgaard
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 Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501

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

2013-05-28 Thread peter dalgaard
(ItemColumn,PriceColumn)])]) (both untested) -- 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

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

2013-05-27 Thread peter dalgaard
- order(as.numeric(sub(preV([0-9]*)A1b, \\1, names(dat (dat1 - dat[o]) -- 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] Create and read symbolic links in Windows

2013-05-25 Thread peter dalgaard
here or some such ... Shouldn't you be warming up to the fussball game anyway? ;-) -- 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] problem with transform and get functions

2013-05-22 Thread peter dalgaard
. 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: pd@cbs.dk Priv: pda...@gmail.com __ R

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

2013-05-22 Thread peter dalgaard
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] strange behaviour with loops and lists

2013-05-19 Thread peter dalgaard
; e.g., x[[2]] is the 3rd element in the above example. -- 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

Re: [R] apply and table

2013-05-19 Thread peter dalgaard
will be really appreciated. Thanks in advance. -- 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

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

2013-05-17 Thread peter dalgaard
] [1,] 172 223 [2,] 173 356 also matrix(unlist(jam),2) [,1] [,2] [1,] 172 223 [2,] 173 356 -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda

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 how to use the subset statement with column

Re: [R] Selecting A List of Columns

2013-05-17 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

[R] R 3.0.1 is released

2013-05-16 Thread Peter Dalgaard
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) = eb723b61539feef013de476e68b5c50a MD5

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

2013-05-16 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. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45

Re: [R] where clauses - help

2013-05-14 Thread peter dalgaard
likely also need %dopar% (case and spaces do matter). And remove a space and add a comma within the first parenthesis. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda

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

2013-05-14 Thread peter dalgaard
, 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 __ R-help@r-project.org mailing list https

Re: [R] Need help to building R package with devtools

2013-05-12 Thread peter dalgaard
a purely formal bug in devtools's version comparison logic, and you need to pester its maintainer. Unless it has been fixed already, in which case you need to update devtools. -pd -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000

Re: [R] scan in R

2013-05-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 Statistics, Copenhagen

Re: [R] question about 1-way anova

2013-05-11 Thread peter dalgaard
? You need to pay more attention to the degrees of freedom for error. -- 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] Paritioning of Interaction SS in ANOVA - Gomez and Gomez(1984) example

2013-05-09 Thread peter dalgaard
://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] Very basic statistics in R

2013-05-08 Thread peter dalgaard
On May 8, 2013, at 20:38 , Robert Baer wrote: On 5/6/2013 7:02 AM, arun wrote: stErr- sd(vec1)/sqrt(length(vec1)) Or possibly, stErr- sd(vec1)/sqrt(!is.na(vec1)) You probably intended sqrt(sum(!is.na(...))). -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business

Re: [R] Extracting elements from a matrix using a vector containing indices

2013-05-07 Thread peter dalgaard
[4,] 283 16 17 32 Ix - sample(1:4,5,replace=TRUE) Ix [1] 3 2 2 4 3 M[cbind(Ix,1:5)] [1] 20 24 11 17 24 -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda

[R] Release plans: R-3.0.1 on May 16

2013-05-06 Thread Peter Dalgaard
We intend to have a patch release version on May 16. The nickname will be Good Sport. Apologies for the somewhat belated announcement. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd

Re: [R] Why can't R understand if(num!=NA)?

2013-05-04 Thread peter dalgaard
On May 3, 2013, at 21:36 , David Winsemius wrote: On May 3, 2013, at 10:46 AM, peter dalgaard wrote: Because comparison with an unknown value yields an unknown result. Anything else would violate the Second Law of Thermodynamics. We cannot have comparisons reducing entropy, now can

Re: [R] MANOVA summary.manova(m) : residuals have rank

2013-05-03 Thread peter dalgaard
0 0 __ 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

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