[R] John M. Chambers Statistical Software Award

2016-10-03 Thread Patrick Breheny
the awards. Inquiries and application materials should be sent to: Patrick Breheny Department of Biostatistics University of Iowa patrick-breh...@uiowa.edu __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman

[R] Statistical Computing & Graphics Student Paper Competition 2017

2016-09-27 Thread Patrick Breheny
s/student/faq.html> and <https://www.amstat.org/ASA/Your-Career/Student-Paper-Competitions.aspx>. Inquiries and application materials should be sent to: Patrick Breheny Department of Biostatistics University of Iowa patrick-breh...@uiowa.edu

[R] John M. Chambers Statistical Software Award

2015-12-04 Thread Patrick Breheny
, and the winner(s) will be given an opportunity to present their work in a topic-contributed session at the meetings. Patrick Breheny Department of Biostatistics University of Iowa patrick-breh...@uiowa.edu -- Patrick Breheny Assistant Professor Department of Biostatistics University of Iowa

[R] John M. Chambers Statistical Software Award

2015-10-02 Thread Patrick Breheny
tings. Patrick Breheny Department of Biostatistics University of Iowa patrick-breh...@uiowa.edu -- Patrick Breheny Assistant Professor Department of Biostatistics University of Iowa N336 College of Public Health Building 319-384-1584 __ R-help@r-projec

[R] ASA Statistical Computing & Statistical Graphics Award

2015-09-28 Thread Patrick Breheny
maximum of four supporting letters, each no longer than two pages Nominations and questions should be sent to the Awards Chair of the Statistical Computing Section at the e-mail address below. Patrick Breheny Department of Biostatistics University of Iowa patrick-breh...@uiowa.edu -- Patri

[R] ASA Statistical Computing & Graphics Student Paper Competition 2016

2015-09-18 Thread Patrick Breheny
.amstat.org/sections/studentpaperawards.cfm as well as the website of the Statistical Computing Section: http://stat-computing.org/awards/ Inquiries and application materials should be emailed to: Student Paper Competition Patrick Breheny patrick-breh...@uiowa.edu -- Patrick Breheny Assistant Pro

Re: [R] glmnet() vs. lars()

2012-03-21 Thread Patrick Breheny
, it is impossible to know in advance how fine the grid must be in order to ensure that only one variable enters the model between any two consecutive lambda values. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky _

Re: [R] cv.glmnet

2012-03-20 Thread Patrick Breheny
ot believe that is possible with the current implementation of glmnet. The glmnet() function includes an intercept by default and there are no options which allow the user to change this. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University o

Re: [R] Graphic legend with mathematical symbol, numeric variable and character variable

2012-03-20 Thread Patrick Breheny
There are a few different ways to do this; see the examples in ?plotmath under the heading "How to combine 'math' and numeric variables". -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky On 03/20/2012 09:09

Re: [R] Metropolis-Hastings in R

2012-03-14 Thread Patrick Breheny
repeatedly manipulate it as though its rows are scalars * you're missing a negative in the normal likelihood. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky On 03/14/2012 01:21 PM, Michael Williams wrote: Hi all, I'm

Re: [R] gam - Y axis probability scale with confidence/error lines

2012-03-14 Thread Patrick Breheny
fit-1.96*pred$se.fit) u <- binomial()$linkinv(pred$fit+1.96*pred$se.fit) plot(x,yy,type="l") lines(x,l,lty=2) lines(x,u,lty=2) -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky On 03/14/2012 01:49 PM, Ben quant wrote:

Re: [R] gam - Y axis probability scale with confidence/error lines

2012-03-14 Thread Patrick Breheny
it object so I can do 'stuff' with it? Thanks, Ben PS - thank you Patrick for your help previously. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] Week number from a date

2012-02-22 Thread Patrick Breheny
To give a little more detail, you can convert your character strings into POSIX objects, then extract from it virtually anything you would want using strftime. In particular, %W is how you get the week number: > dateRange <- c("2008-10-01","2008-12-01") > x <- as.POSIXlt(dateRange) > strftime(

Re: [R] CI for the median difference

2012-02-18 Thread Patrick Breheny
, but not for the median: A =c(619, 600, 490, 1076, 654, 955, 563, 955, 827, 873, 1253) B =c(346, 507, 598, 228, 576, 338, 1153, 354, 560, 517, 381) > median(A)-median(B) [1] 320 > median(A-B) [1] 273 -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Stat

Re: [R] varaince explined of a regression tree using ctree

2011-12-06 Thread Patrick Breheny
ulate: X <- matrix(rnorm(100*10),ncol=10) y <- X%*%c(rep(2,5),rep(0,5))+rnorm(100) fit <- ctree(y~.,data=as.data.frame(X)) r <- y - predict(fit) 1-var(r)/var(y) -- Patrick Breheny Assistant Professor Department of Biostatistics Department of S

Re: [R] logistic regression - glm.fit: fitted probabilities numerically 0 or 1 occurred

2011-12-02 Thread Patrick Breheny
is leading to the fitted probabilities near 0 and 1 you are observing (note that only 0.1% of the data is in region 4 above, although region 4 accounts for 99.1% of the range of x). -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky

Re: [R] Fisher Exact Test

2011-11-18 Thread Patrick Breheny
threshold. Am I running my code wrong? Your code is fine; your conclusion is valid (assuming you mean "...better than site 1..."). -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky ___

Re: [R] GAM

2011-11-09 Thread Patrick Breheny
onus only has 7 unique values. Claims does not pose any problem, as it has 98 unique values. As Jean suggested, you can get around this issue with: amgam<- gam(log(Payment) ~ offset(log(Insured)) + s(as.numeric(Kilometres),k=5) + s(Bonus,k=7) + Make + s(Claims),family = gaussian, dat

Re: [R] binomial logistic regression question

2011-09-27 Thread Patrick Breheny
glm<- glm(cbind(SUCCESSESS,TRIALS) ~ INDEP1 + INDEP2 + INDEP3, data = data,family = binomial) as is specified in the details of ?glm. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky __

Re: [R] Force regression line to a 1:1 relationship

2011-09-14 Thread Patrick Breheny
On 09/14/2011 11:36 AM, David Winsemius wrote: On Sep 14, 2011, at 10:52 AM, Patrick Breheny wrote: The latter type of plot is called a "partial regression plot" or "added variable plot". They are discussed in any regression textbook, as well as wikipedia and probably dozen

Re: [R] Force regression line to a 1:1 relationship

2011-09-14 Thread Patrick Breheny
y~X) plot(fit) The latter type of plot is called a "partial regression plot" or "added variable plot". They are discussed in any regression textbook, as well as wikipedia and probably dozens of other web sites. -- Patrick Breheny Assistant Professor Department of Bios

Re: [R] generate randomly a value of a vector

2011-09-08 Thread Patrick Breheny
m is the number of random vectors you wish to generate in this manner. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] misclassification rate

2011-09-03 Thread Patrick Breheny
tion rate is > 1-sum(diag(tab))/sum(tab) [1] 0.54 -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] Question about BIC of two different regression models? how should we compare two regression models?

2011-09-02 Thread Patrick Breheny
; my remark was only meant to refer to the simple case of logistic regression in the original post, and certainly should not be construed as a blanket statement applying to all possible hypothesis tests of all possible models. -- Patrick Breheny Assistant Professor Department of Biostatistics

Re: [R] Question about BIC of two different regression models? how should we compare two regression models?

2011-09-02 Thread Patrick Breheny
On 09/02/2011 08:48 AM, John Sorkin wrote: I believe when using BIC one needs to compare nested models This is wrong. Hypothesis tests rely on nested models; information criteria do not. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University

Re: [R] How would you calculate this type of p-value using R?

2011-08-18 Thread Patrick Breheny
#x27;p-value' would simply be the fraction of cases in your sample as large or larger than the observation in question. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky __ R

Re: [R] Cv.glment question -- why giving me an error

2011-08-11 Thread Patrick Breheny
ot have an observation in each class in each fold. It would be rather difficult to estimate the probability of belonging to a class without any data. 2) Do you really hope to obtain a meaningful fit for a multinomial model with only 8 observations? How many classes do you have? -- Patri

Re: [R] studentized and standarized residuals

2011-08-10 Thread Patrick Breheny
;externally studentized residuals"). There is a closed form expression, but it is somewhat bulky. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky __ R-help@r-project.org mailing lis

Re: [R] glmnet

2011-08-10 Thread Patrick Breheny
On 08/10/2011 03:00 AM, Nick Sabbe wrote: Finally, to avoid downward bias, you could run a normal glm with only the variables selected in the previous step. At the cost, of course, of introducing upward bias -- Patrick Breheny Assistant Professor Department of Biostatistics Department of

Re: [R] limma contrast matrix

2011-08-04 Thread Patrick Breheny
ou take the advice of point 1) and put an intercept in your model. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/list

Re: [R] glmnet with binary logistic regression

2011-07-24 Thread Patrick Breheny
putational convenience when n is large, which is not a large problem in your case. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] glmnet with binary logistic regression

2011-07-23 Thread Patrick Breheny
ger than usual? If so, and you suspect a problem with the way that glmnet is partitioning the data set into cross-validation folds, you can specify that with the 'foldid' option. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics Univ

Re: [R] FW: lasso regression

2011-07-12 Thread Patrick Breheny
isting of only the first 8 observations, then all the columns. Perhaps you mean: X <- crs[,1:8] y <- crs[,9] If this is not the case, please include the output of head(crs) and then tell us which variable is your response. -- Patrick Breheny Assistant Professor Department of B

Re: [R] working with sparse matrix

2011-06-21 Thread Patrick Breheny
matrices, this and other operations will be faster if the matrix is explicitly stored as a sparse matrix, as implemented in the 'Matrix' package. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky _

Re: [R] [Plea to the R Gods] Theoretical and Empirical CDFs

2011-06-02 Thread Patrick Breheny
comparison: plot(ecdf(x),add=TRUE,do.points=FALSE,verticals=TRUE) Please be aware, however, that density estimation is a complicated topic with an extensive literature. -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics Univer

Re: [R] based on mean and std

2011-06-02 Thread Patrick Breheny
You could try: f <- function(x){pnorm(x,mean=10,sd=20)} curve(f,from=-10,to=30) Or: x <- seq(-10,30,len=101) y <- pnorm(x,mean=10,sd=20) plot(x,y,type="l") -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky

Re: [R] dynamic programming

2011-05-29 Thread Patrick Breheny
go into greater detail about what you are trying to accomplish with this line of code. Also, probably not a good idea to have a variable called 'c', as this is bound to lead to confusion with the function for combining objects, 'c()'. -- Patrick Breheny Assistant

Re: [R] Questions regrading the lasso and glmnet

2011-05-29 Thread Patrick Breheny
You have 5 variables. Variable selection is not your goal. What you are trying to do is fit a curve (as opposed to a line) through your data, along possibly with interactions. I would suggest looking into splines, provided for example in the mgcv package. -- Patrick Breheny Assistant Prof

Re: [R] Simple order() data frame question.

2011-05-12 Thread Patrick Breheny
E),] aa bb 10 j -2.21178676 9 i -0.52119533 8 h 0.80990322 7 g 2.44362935 6 f 3.16449690 5 e -0.33932586 4 d -0.86918700 3 c -1.86750927 2 b -0.65623164 1 a 0.06365513 The expression 'df1[,-2]' removes the second column from df1; clearly not what you

Re: [R] Recursive Indexing Failed

2011-05-09 Thread Patrick Breheny
x[[1]][[2]], not c(x[[1]], x[[2]]). Thank you for the clarification; I stand corrected. ___ Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky __ R-help@r-project.org ma

Re: [R] Recursive Indexing Failed

2011-05-09 Thread Patrick Breheny
;))) sapply(x,'[[',"Two") [,1] [,2] [1,] "b" "e" [2,] "c" "f" In your example, it seems sapply(CRagentInTime[[1]][[2]],'[[',"sr") would work, but I am not in a position to replicate your code, as is it not s

Re: [R] Recursive Indexing Failed

2011-05-09 Thread Patrick Breheny
ance for your help Best Regards Alex ___________ Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

Re: [R] Box-Cox transformation in R

2011-05-04 Thread Patrick Breheny
. ___ Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] create a folder with mode '0777'

2011-05-04 Thread Patrick Breheny
. In other words, this is a linux issue, not an R issue -- the same thing happens when you use mkdir. This can be overridden, however. For example, system("chmod -R 0777 test") which recursively changes the mode of test and all its subdirectories from within R. _____

Re: [R] first occurrence of a value?

2011-05-04 Thread Patrick Breheny
2 2 2 1 NA _______ Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky On 05/04/2011 07:52 AM, Albert-Jan Roskam wrote: Hello, A simple question perhaps, but how do I, within each row, find the first occurence of th

Re: [R] Overlapping x axes using Lattice

2011-05-04 Thread Patrick Breheny
The scales argument in lattice controls the appearance of the axes. It consists of two lists, one for the x axis and one for the y axis. For example: histogram(~pesti[,1]|pesti[,2]+ pesti[,3],scales=list(x=list(at=c(2,6),labels=c("First","Second" This allows you to place the labels whe