[R] Imputing Missing Data: A Good Starting Point?

2011-11-01 Thread Sascha Vieweg
for a program that provides some future, and of course I want some background on what I am doing (and what not). Could you help with some hints, experiences, and recommendations? Thank you. Regards *S* -- Sascha Vieweg, saschav...@gmail.com __ R-help@r

[R] S: expert mailing list for general statistical questions

2011-04-20 Thread Sascha Vieweg
on a mailing list or newsgroup appropriate for such issues? Thanks for your tips. Regards, *S* -- Sascha Vieweg, saschav...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] Include C++ DLL, error in ...: C symbol name not in load table

2011-04-20 Thread Sascha Vieweg
-apple-darwin9.8.0 arch i386 os darwin9.8.0 system i386, darwin9.8.0 status major 2 minor 12.2 year 2011 month 02 day25 svn rev54585 language R version.string R version 2.12.2 (2011-02-25) -- Sascha Vieweg

Re: [R] cube root

2011-04-17 Thread Sascha Vieweg
, can anybody explain this?! (Why is x[1]^(1/3)=y[1]=NaN, but -8^(1/3)=-2?) -8^(1/3) == (-8)^(1/3) # NA -8^(1/3) == -(8^(1/3)) # TRUE Thx!!! You're welcome. -- Sascha Vieweg, saschav...@gmail.com __ R-help@r-project.org mailing list https

Re: [R] Rotating the x-axis labels of a barplot

2011-04-16 Thread Sascha Vieweg
, they line up with the right-side of each bar. Try to set the parameter: adj=.5 (see ?par). HTH, *S* -- Sascha Vieweg, saschav...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] multinom() residual deviance

2011-04-09 Thread Sascha Vieweg
in the model. Hence the two models are not directly comparable, so why should the deviance be? Bill Venables. From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Sascha Vieweg [saschav...@gmail.com] Sent: 09 April 2011 01:14 To: r-help@r

Re: [R] glm with multiple vars

2011-04-09 Thread Sascha Vieweg
, since glm expects a formula object: vars - names(x) f - as.formula(paste(vars[1], ~, paste(vars[-1], collapse=+), collapse=)) glm(f, data=x) Of course, the pastes in the f-line need to be adjusted in each loop. HTH, *S* -- Sascha Vieweg, saschav...@gmail.com

[R] multinom() residual deviance

2011-04-08 Thread Sascha Vieweg
of the pseudo R-squares with function pR2(), package pscl.) Could you give good advice? Thanks *S* -- Sascha Vieweg, saschav...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] code for permutative operation

2011-03-14 Thread Sascha Vieweg
, the zeros in the matrix may cause problems with other operations than sum. Thanks, *S* -- Sascha Vieweg, saschav...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] code for permutative operation

2011-03-14 Thread Sascha Vieweg
On 11-03-14 21:09, David Winsemius wrote: On Mar 14, 2011, at 3:52 PM, Sascha Vieweg wrote: Hello, I need some form of a permutative operation on a numeric vector x x = (v1, v2, v3, ..., vN) that produces x.r = (v1, v1+2, v1+v2+v3, ... v1+v2+...+vN) If the operation is sum() I can run x

[R] plotCI() with ggplot2

2011-03-08 Thread Sascha Vieweg
=.8 ) I like to produce this plot with package ggplot2, but I have just discovered it and don't know where to start. It would be great if somebody could give me a starting point with code for that particular task. Thanks, *S* -- Sascha Vieweg, saschav...@gmail.com

[R] S. function calculating x +- y

2011-03-04 Thread Sascha Vieweg
Hello, I am looking for an elegant one-liner for the following operation: x - rnorm(10) y - runif(10) c(mean(x)-mean(y), mean(x)+mean(y)) I thought about apply(data.frame(x, y), 2, mean) but I don't know how to apply the +- operation on the result of apply. Thanks, *S* -- Sascha Vieweg

Re: [R] create a data frame with the given column names

2011-02-17 Thread Sascha Vieweg
code. Then you could start here: vstr - sample(letters, sample(1:20, 1), repl=F) df - as.data.frame(matrix(ncol=length(vstr), dimnames=list(NULL, vstr))) str(df) HTH, *S* -- Sascha Vieweg, saschav...@gmail.com __ R-help@r-project.org mailing list

Re: [R] From SPSS Syntax to R code

2011-02-13 Thread Sascha Vieweg
a one-liner, however, this should work strata[atsub2==1] - R strata[atsub2=5 | atsub2=27] - M # change statements to prevent overwriting strata[atsub40] - Li strata[atsub420 | atsub620] - La summary(strata) HTH, *S* -- Sascha Vieweg, saschav...@gmail.com

Re: [R] From numeric vector to string vector

2011-02-13 Thread Sascha Vieweg
understanding: Why not as.character(Vect) ? -- Sascha Vieweg, saschav...@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

Re: [R] p-value for y in non-parametric distribution, Y

2011-02-08 Thread Sascha Vieweg
On 11-02-07 19:21, Sascha Vieweg wrote: Hello, knowing that some index y, with y(341)=2, SE=3, is t-distributed, I (think I) can find an appropriate (left/one-sided) p-value with R: y - 2 R: yse - 3 R: (p - 1-pt(y/yse, df=341)) Now, some simulation resulted in the non-parametric

[R] p-value for y in non-parametric distribution, Y

2011-02-07 Thread Sascha Vieweg
(21277) How can I find the p-value of y then? Simply counting? Thanks, *S* -- Sascha Vieweg, saschav...@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

[R] boot() versus loop, and statistics option

2011-02-06 Thread Sascha Vieweg
()' by default return already-calculated statistics? Thanks for hints and help, *S* -- Sascha Vieweg, saschav...@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

[R] Create factorial design

2011-02-05 Thread Sascha Vieweg
[, area]==i] - ass[ ass[, area]==i , strategy] } and then binding the new variable to the data frame R: str(df2 - as.data.frame(cbind(df, strategy=x))) which works fine. My question is whether there is a more elegant way? Thanks, *S* -- Sascha Vieweg, saschav...@gmail.com

Re: [R] R-/Text-editor for Windows?

2011-01-31 Thread Sascha Vieweg
On 11-01-28 19:55, Sascha Vieweg wrote: [...] Besides Emacs and the R built-in editor, could you recommend a good editor for Windows, even some commmercial for a small price? Thanks for all your answers and experiences. You helped a lot. *S

[R] Sweave: change tab size

2011-01-31 Thread Sascha Vieweg
did not provide a cue. Thanks for hints, *S* -- Sascha Vieweg, saschav...@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

[R] read ODS (OOorg spreadsheet) files?

2011-01-28 Thread Sascha Vieweg
and updates, *S* -- Sascha Vieweg, saschav...@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

Re: [R] read ODS (OOorg spreadsheet) files?

2011-01-28 Thread Sascha Vieweg
On 11-01-28 17:37, Sascha Vieweg wrote: I am wondering if there's any news about reading ODS files directly. ODS files are the spreadsheet files produced by OpenOffice.org. Currently, I export sheets in these files to csv files, one for each sheet. However, it would be much more convenient

[R] R-/Text-editor for Windows?

2011-01-28 Thread Sascha Vieweg
built-in editor, could you recommend a good editor for Windows, even some commmercial for a small price? (For a comparison, TextMate for OS X is 35 USD and does a great job on all plain text and code related issues, not only R.) Thanks, *S* -- Sascha Vieweg, saschav...@gmail.com

Re: [R] Help needed

2011-01-27 Thread Sascha Vieweg
/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. -- Sascha Vieweg, saschav...@gmail.com __ R-help@r-project.org mailing list https

Re: [R] Help needed

2011-01-27 Thread Sascha Vieweg
On 11-01-27 15:12, Sascha Vieweg wrote: On 11-01-27 13:16, Ben Boyadjian wrote: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only

Re: [R] Writing program for these

2011-01-27 Thread Sascha Vieweg
__ 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. -- Sascha Vieweg, saschav...@gmail.com

Re: [R] creating categorical frequency tables from continuous data

2011-01-27 Thread Sascha Vieweg
-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. -- Sascha Vieweg, saschav...@gmail.com

Re: [R] which operating system + computer specifications lead to the best performance for R?

2011-01-22 Thread Sascha Vieweg
environment (things like passing shell commands from R to my system or other interpreters), easy graphics etc. If that helps a bit ... -- Sascha Vieweg, saschav...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] predict() for bootstrapped model coefficients

2011-01-22 Thread Sascha Vieweg
On 11-01-20 17:05, Sascha Vieweg wrote: I run a multinomial regression on a data set with an outcome that has three values. First, I build an initial model, b.mod. Then I run a loop to bootstrap the coefficients. For the initial model, using predict(), I can print the wrong/false predictions

Re: [R] Accessing MySQL Database in R

2011-01-21 Thread Sascha Vieweg
, minimal, self-contained, reproducible code. -- Sascha Vieweg, saschav...@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

Re: [R] Statistical formulas

2011-01-18 Thread Sascha Vieweg
recommendation is (still) also: Hays, W. L. (1994). Statistics. Belmont, CA: Wadsworth. Depending on your German skills (if at all) THE Bortz could be a good textbook, Bortz, J. (2005). Statistik für Human- und Sozialwissenschaftler (6. Aufl). Berlin: Springer. Good luck, *S* -- Sascha Vieweg

[R] t-test calculation correct?

2011-01-17 Thread Sascha Vieweg
is wrong and why. Ref.: Bortz, J. (2005). Statistik für Human- und Sozialwissenschaftler (6. Aufl). Berlin: Springer. -- Sascha Vieweg, saschav...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] unicodepdf font problem RESOLVED

2011-01-13 Thread Sascha Vieweg
/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. -- Sascha Vieweg, saschav...@gmail.com __ R-help@r-project.org mailing list https