Re: [R] More simple implementation is slow.

2012-06-09 Thread peter dalgaard
On Jun 9, 2012, at 13:16 , wl2776 wrote: $sample.interval [1] 0.02 $sampling.time [1] 0.02 Apparently, it is about twise faster. Too fast to measure, I'd say. Try system.time, and/or multiple replications. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business

Re: [R] Determinant and inverse using cholsky parameter

2012-06-08 Thread peter dalgaard
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 3, 2000

Re: [R] remove leading slash

2012-06-08 Thread peter dalgaard
, CT __ 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] conditional statement to replace values in dataframe with NA

2012-06-07 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] factor coercion with read.csv or read.table

2012-06-07 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] Abrupt closure of R when using .C function

2012-06-07 Thread peter dalgaard
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 3, 2000

Re: [R] Chi square value of anova(binomialglmnull, binomglmmod, test=Chisq)

2012-06-06 Thread peter dalgaard
on these two values? That's the general mechanism, yes. (Whether the chi-square distribution holds after variable selection is a more difficult issue. Frank Harrell might chime in and remind us that there are books on that subject.) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen

Re: [R] Read txt File contains character 

2012-06-05 Thread peter dalgaard
. Opening the file in binary mode (?file) might help, but as I'm not on Windows, I can't easily check for you. Not sure does eveybody able to view the character, it's looks like this. http://r.789695.n4.nabble.com/file/n4632369/arrow.png -- Peter Dalgaard, Professor, Center for Statistics

Re: [R] R 2.15.0 and 2.14.2 crash on the same code that runs on 2.14.1

2012-06-03 Thread peter dalgaard
-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)38153501

Re: [R] R and igraph problems

2012-06-03 Thread peter dalgaard
On Jun 2, 2012, at 15:43 , jalantho...@verizon.net wrote: Why is igraph 0.5.5 not on the igraph sourceforgwe home page? You'll have to ask the igraph developers... Possibly, they just ran out of round tuits. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School

Re: [R] R 15.0 Warning message.

2012-06-03 Thread peter dalgaard
.bash_profile or .bashrc. -- 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 15.0 Warning message.

2012-06-03 Thread peter dalgaard
of configuration trick you might be missing to get UTF-8 locales properly installed. (Googling utf-8 ubuntu seem to come up with relevant stuff.) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email

Re: [R] Partial R-square in multiple linear regression

2012-06-03 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: pda

Re: [R] reduced variate in R

2012-06-03 Thread peter dalgaard
is another. -- 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] Question on meaning of '%+%', '%?%' (? = various single letter) in code

2012-06-01 Thread peter dalgaard
), and some packages add their own operators like %+%. -- 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] fitting allometric equation using a for a power model

2012-05-31 Thread peter dalgaard
)$sigma^2)/2) is the bias correction #prediction-exp(tempint+tempslope*log(lngth))*exp((summary(temppow)$sigma^2)/2) lines(prediction) It does help considerably to use lines(length, prediction)! (And that bias correction looks really dubious to me, but let's not go there...) -- Peter Dalgaard

Re: [R] Wilcoxon-Mann-Whitney U value: outcomes from different stat packages

2012-05-30 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] Wilcoxon-Mann-Whitney U value: outcomes from different stat packages

2012-05-30 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

[R] Release plans: R-2.15.1 on June 22

2012-05-29 Thread Peter Dalgaard
scheme. There have been very few issues with 2.15.0, but some people may be waiting superstitiously for a .1 release (or expecting one come along any day now) and need to be informed about the plans. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3

Re: [R] a simple mixed model

2012-05-27 Thread peter dalgaard
. For an incomplete design, the model is the same, but the calculations are less simple. -- 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] a simple mixed model

2012-05-27 Thread peter dalgaard
pretty obviously can't be randomized). This may or may not be relevant, but it won't hurt to include a null effect, except for the loss of a couple of DF. Thanks very much, John From: peter dalgaard pda...@gmail.com To: array chip arrayprof...@yahoo.com Cc: r-help@r-project.org r

Re: [R] glm(weights) and standard errors

2012-05-25 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] R+Stata batch mode

2012-05-25 Thread peter dalgaard
start. There should be an error message in the output file in that case. -- 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 open a file with a name changed?

2012-05-25 Thread peter dalgaard
gives me the date. -- 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] Weird date conversion

2012-05-23 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] Median computation

2012-05-23 Thread peter dalgaard
an expensive identity operation. Also, you should probably try running Benno's exact code, just for comparison. Some of those multicore machine are really rather slow if you only use one core for your process. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg

Re: [R] Could incomplete final line found be more serious than a warning?

2012-05-22 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] Names of Greek letters stored as character strings; plotmath.

2012-05-21 Thread peter dalgaard
a is fundamentally different from the variable name a. -- 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] for loop, error in model frame.default ... variable lengths differ

2012-05-21 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] anovas ss typeI vs typeIII

2012-05-20 Thread peter dalgaard
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 3, 2000

Re: [R] removeing only rows/columns with na value from square ( symmetrical ) matrix.

2012-05-20 Thread peter dalgaard
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 3, 2000

Re: [R] Menus - best practices?

2012-05-19 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

Re: [R] MANOVA with random factor

2012-05-19 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] UTF-16 input and read.delim/scan

2012-05-19 Thread peter dalgaard
-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 mailing list

Re: [R] Optimization inconsistencies

2012-05-18 Thread peter dalgaard
On May 18, 2012, at 09:10 , Hans W Borchers wrote: peter dalgaard pdalgd at gmail.com writes: On May 18, 2012, at 00:14 , Nathan Stephens wrote: I have a very simple maximization problem where I'm solving for the vector x: objective function: w'x = value to maximize box

Re: [R] Optimization inconsistencies

2012-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

Re: [R] finding mean and SD for a log-normal distribution

2012-05-16 Thread peter dalgaard
. could someone please help me with this question? Perhaps this was what you were looking for: d - log(c) mean(d) [1] 1.675003 sd(d) [1] 0.4656469 Taking exp() of a log-normal rarely makes much sense. More commonly, you take log() to get a normal distribution. -- Peter Dalgaard, Professor

Re: [R] Inf and lazy evaluation

2012-05-15 Thread peter dalgaard
, in passing, that lazy evaluation prevents the stop() from kicking in, if a known algorithm is given). Then later on, we have breaks - pretty(range(x), n = breaks, min.n = 1) so by the time we need the xlim, breaks will be a numeric vector which you _can_ take the range of. -- Peter Dalgaard

Re: [R] Why can we combine design matrix and data-frame in R?

2012-05-14 Thread peter dalgaard
, or a formula expression consisting of factors, vectors or matrices connected by formula operators. Not the most informative documentation. But Peter Dalgaard is a most authoritative source! And also I have checked: Any more thoughts? Data frames are odd things; a column need

Re: [R] Why can we combine design matrix and data-frame in R?

2012-05-12 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, Copenhagen Business School Solbjerg

Re: [R] What is the most cost effective hardware for R?

2012-05-09 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] low R square value from ANCOVA model

2012-05-08 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] low R square value from ANCOVA model

2012-05-08 Thread peter dalgaard
, yes. One might quibble over the use of large because, but it's not important for the main point. -pd John From: peter dalgaard pda...@gmail.com To: array chip arrayprof...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Monday, May 7, 2012 11:07 PM Subject: Re: [R] low R

Re: [R] Statistical power of correlations.

2012-05-07 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] Can't find the error in a Binomial GLM I am doing, please help

2012-05-07 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

Re: [R] Understanding custom contrasts

2012-05-06 Thread peter dalgaard
properties and interpretation, but not in the general case. In a suitable sense, the orthogonal contrast matrices are their own inverses. However, for the generic case, you need to find a solution to the equation A'C=I given A or C. -- Peter Dalgaard, Professor, Center for Statistics

Re: [R] read.table() vs read.delim() any difference??

2012-05-04 Thread peter dalgaard
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 Email: pd

Re: [R] R help!

2012-05-03 Thread peter dalgaard
to sapply(x.split,`[`,1) [1] 12/31/11 1/1/12 sapply(x.split,`[`,2) [1] 23:45 2:15 It's a bit inefficient, though. Other ideas: sub( .*$, , x) [1] 12/31/11 1/1/12 sub(^.* , , x) [1] 23:45 2:15 read.table(text=x) V1V2 1 12/31/11 23:45 2 1/1/12 2:15 -- Peter Dalgaard

Re: [R] Hypothesis Testing using Wald Criterion for two regression models with dummy variables

2012-05-02 Thread peter dalgaard
sense to me. -- 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] Hypothesis Testing using Wald Criterion for two regression models with dummy variables

2012-05-02 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

Re: [R] Help with loess Standard Error of the Residuals

2012-05-01 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] index moran

2012-05-01 Thread peter dalgaard
On May 1, 2012, at 09:06 , Ulfa Hasanah wrote: what is nb2listw in index moran? Did you try help(nb2listw) ? -- 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] Regression

2012-05-01 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, Copenhagen Business School

Re: [R] Questions

2012-05-01 Thread peter dalgaard
(read.table(pipe(pbpaste))) Ozone Solar.R Wind Temp Month Day 141 190 7.4 67 5 1 236 118 8.0 72 5 2 312 149 12.6 74 5 3 418 313 11.5 62 5 4 5NA NA 14.3 56 5 5 628 NA 14.9 66 5 6 -- Peter Dalgaard

Re: [R] Why does the order of terms in a formula translate into different models/ model matrices?

2012-05-01 Thread peter dalgaard
to terms() what kind of variable x is. So if you want different behavior if x is a factor than if it is continuous, you're out of luck... Not quite sure the last three lines of my note below make sense, though. -pd On Jan 29, 2012, at 11:24 , peter dalgaard wrote: On Jan 29, 2012, at 02:42

Re: [R] Question about expand.grid function in R

2012-05-01 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] RCS (Restriced Cubic Splines)

2012-04-29 Thread peter dalgaard
-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)38153501

Re: [R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-25 Thread peter dalgaard
] Yes, I was wondering why people were avoiding the obvious use of grepl(). I'm not too happy about the nmuta technique though: What about deletionmutation and such? Might as well do the safe(r) thing: i2 - grepl(unmuta, tmp) | grepl(nonmuta, tmp) -- Peter Dalgaard, Professor, Center

Re: [R] On the Design of the R Language

2012-04-25 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] Some Help Needed

2012-04-24 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] Solve an ordinary or generalized eigenvalue problem in R?

2012-04-21 Thread peter dalgaard
). Could you please document that? There are many misconceptions about when eigenvectors are correct and platform dependencies too. As far as I can tell, both R and Matlab use the same LAPACK routines. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads

Re: [R] Solve an ordinary or generalized eigenvalue problem in R?

2012-04-21 Thread peter dalgaard
On Apr 21, 2012, at 19:13 , Berend Hasselman wrote: On 21-04-2012, at 16:40, peter dalgaard wrote: On Apr 21, 2012, at 15:22 , Luke Hartigan wrote: Hi all, In my experience, using eigen to solve generalized eigenvalue / eigenvector problems only gives correct looking eigenvalues

Re: [R] error loading tcltk2

2012-04-20 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] non-numeric argument in mle2

2012-04-19 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] Bivariate normal integral

2012-04-19 Thread peter dalgaard
to the cell integral if you just multiply by the cell area. If that isn't good enough, there are finite-difference formulas that could improve the approximation (usually by several orders of magnitude in dx and dy) using the nearby values on the grid. -- Peter Dalgaard, Professor, Center

Re: [R] error using nls with logistic derivative

2012-04-17 Thread peter dalgaard
) lines(x0,predict(ratelogis,newdata=data.frame(X=x0))) lines(x0,evalq(a*(exp((b-X)/c)*(1/c))/(1 + exp((b-X)/c))^2,envir=list(a = 21.16322, b = 8.83669, c = 2.957765, X=x0)), lty=dashed) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000

Re: [R] basic question predict GLM offset

2012-04-15 Thread peter dalgaard
(or 10, maybe), but it seems easier to divide and conquer (pardon the pun). -- 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] match values from data.frame and vector

2012-04-15 Thread peter dalgaard
), rep(NA,2), rep(2,4)) df1 - data.frame(c1 = c(1,2), c2 = c(5,6)) I would like to get vector x2: x2 [1] 5 5 5 NA NA 6 6 6 6 Thanks a lot, OV You mean like this? df1$c2[match(x1, df1$c1)] [1] 5 5 5 NA NA 6 6 6 6 -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen

Re: [R] Error: R for Windows GUI front-end has stopped working

2012-04-14 Thread peter dalgaard
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 Email: pd

Re: [R] Seemingly simple lm giving unexpected results

2012-04-14 Thread peter dalgaard
and defeat that: solve(crossprod(x), crossprod(x,y), tol=0) [,1] -2.959385e+09 x1 2.218414e+00 Which, as you'll notice is, er, somewhat off the mark. /lecture on numerical linear algebra -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg

Re: [R] nls function

2012-04-11 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] nls function

2012-04-10 Thread peter dalgaard
* x),data = penetrationks28, start = + list(a=3,b = exp(4),c=.67), trace = T) 53.23186 : 3.0 54.59815 0.67000 2.188135 : 2.7131685 71.6770898 0.7187123 1.970939 : 2.6654559 71.6169034 0.7057594 ... -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School

Re: [R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-09 Thread peter dalgaard
.) The direct cause of your problem seems to be that if x is a vector, so is y, and your temp.fn returns a vector, so int.fn returns a matrix, and integrate() is unhappy with that. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg

Re: [R] Difference between spec.pgram spec.ar

2012-04-09 Thread peter dalgaard
to some sort of preprocessing that removes low-frequency components? At any rate, this isn't really about R, is it? -- 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] how to compute a vector of min values ?

2012-04-06 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] A trivial plot gives open circles as the plot char but another one gives me qs . . why is this?

2012-04-03 Thread peter dalgaard
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] help interpreting aov results

2012-03-31 Thread peter dalgaard
at each fragment. Apologies to Mr. Kamakshaiah, whose inquisitiveness really doesn't deserve being poked fun at, but David's remark definitely calls for a nomination to the fortunes package! -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000

[R] R 2.15.0 is released

2012-03-30 Thread Peter Dalgaard
-2.15.0.tar.gz or wait for it to be mirrored at a CRAN site nearer to you. 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

Re: [R] discrepancy between paired t test and glht on lme models

2012-03-29 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] What is 'freeny.x' object?

2012-03-29 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] CI with confint

2012-03-28 Thread peter dalgaard
-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 mailing list

Re: [R] fun.zero.omit {GLDEX}

2012-03-28 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] subset problem

2012-03-28 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] row, col function but for a list (probably very easy question, cannot seem to find it though)

2012-03-27 Thread peter dalgaard
the [[-assignment inside the anonymous function, but the assignment is to a local copy which is deleted on exit, and the return value is the rhs of the assignment.) Please: x - lapply(1:10, function(z) 1:z) or even x - lapply(1:10, seq_len) -- Peter Dalgaard, Professor Center for Statistics, Copenhagen

Re: [R] SPSS R-Menu for Ordinal Factor Analysis

2012-03-26 Thread peter dalgaard
, rather like a piece of an SPSS syntax file. -- 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 to install tclRequire(Iwidgets)

2012-03-25 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] Weird POSIXct behaviour

2012-03-25 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] output by(...)

2012-03-25 Thread peter dalgaard
at gmail.com __ 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] R numerical integration

2012-03-24 Thread peter dalgaard
)/(1+exp(-x*sigma)),a,Inf,rel.tol=1e-10)$value I1+I2+I3 [1] 0.4999626 (I'm still not quite happy with the fact that I1 gets essentially set to zero in the above, but the essential point is that you need to be prepared to do a little analytical work to deal with tricky integrands.) -- Peter

Re: [R] plot a BARPLOT with sd deviation bar up and down

2012-03-23 Thread peter dalgaard
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 Email: pd

Re: [R] Type II and III sum of squares (R and SPSS)

2012-03-22 Thread peter dalgaard
),each=4). -- 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] anova.lm F test confusion

2012-03-21 Thread peter dalgaard
gain a few denominator DF. It does, however, imply that the F tests with a common denominator are not independent, as opposed to the proper successive F tests. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45

Re: [R] Type II and III sum of squares (R and SPSS)

2012-03-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] glm: getting the confidence interval for an Odds Ratio, when using predict()

2012-03-20 Thread peter dalgaard
,] Many thanks, Dominic C. -- 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] SE from nleqslv

2012-03-20 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, Copenhagen Business School

Re: [R] glm: getting the confidence interval for an Odds Ratio, when using predict()

2012-03-19 Thread peter dalgaard
-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)38153501

Re: [R] glm: getting the confidence interval for an Odds Ratio, when using predict()

2012-03-19 Thread peter dalgaard
. 2012/3/19 peter dalgaard pda...@gmail.com There's no trivial way since you need the covariance of pred2 and pred1 to calculate the variance of the difference. I think you can proceed somewhat like as follows (I can't be bothered to test it without a reproducible example to start from. You

Re: [R] ANOVA testing over nested MS term

2012-03-18 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] How to test the statistical significance of the difference of two univariate Linear Regression betas?

2012-03-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] (Fisher) Randomization Test for Matched Pairs: Permutation Data Setup Based on Signs

2012-03-11 Thread peter dalgaard
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 3, 2000

<    8   9   10   11   12   13   14   15   16   17   >