[R] rpostgresql - write table to specific tablespace?

2014-03-03 Thread julian.bothe
Hello everybody, is there a possibility to write a data.frame as a table to a postgresql-database on a specific table_space? As I see it, the normal dbWriteTable() function does not provide this functionality. Can I do it using a form of dbSendQuery? Lamentably, I did not find any infor

Re: [R] issues with calling predict.coxph.penal (survival) inside a function

2013-11-18 Thread julian.bothe
Hello, and thanks for the answer. 1) I found a work-around - in the end it is easier than thought before. The only thing you have to do is to have the same variable name with the new values. So if predict(coxph.penal.fit, newdata[subset,]) does not work inside a function, the following works: p

[R] issues with calling predict.coxph.penal (survival) inside a function - subset-vector not found. Because of NextMethod?

2013-11-13 Thread julian.bothe
Hello everyone, I got an issue with calling predict.coxph.penal inside a function. Regarding the context: My original problem is that I wrote a function that uses predict.coxph and survfit(model) to predict a lot of survival-curves using only the basis-curves for the strata (as delivered

[R] Bug in Survival - predict.coxph with collapse? (related to question "censor=FALSE and id options in survfit.coxph")

2013-09-23 Thread julian.bothe
Hello everyone, Hello Terry, Trying to find workarounds for the bug described in http://r.789695.n4.nabble.com/censor-FALSE-and-id-options-in-survfit-coxph -td4670320.html, I found another issue which might or might not be related and which I think is a bug - unless I got the usage of the col

Re: [R] prediction survival curves for coxph-models; how to extract the right strata per individual

2013-08-05 Thread julian.bothe
At first, I would like to plot the survival curves. After that , the main use will be to calculate conditional probabilities - given that an individual already survived x days, what will be the chance it survives till day ,e.g., 100. I 've already found a solution, though. Of the - non-subscribed

[R] prediction survival curves for coxph-models; how to extract the right strata per individual

2013-07-24 Thread julian.bothe
Hello everyone, It somehow seems like a strange question, but I don't find the answer. I think my question is the same stephenb wanted to ask in January, but it seems he didn't get an answer (see http://r.7

Re: [R] error in "predict.gam" used with "bam"

2013-07-17 Thread julian.bothe
Solved it!! ;) The problem was that the test-data contained factor-levels the training-data didn't. So when trying to fit this new factor-levels to a model which didn't have this levels, the error occurred. When excluding the factor-levels not used when fitting the model or when taking care all l

[R] error in "predict.gam" used with "bam"

2013-07-08 Thread julian.bothe
Hello everyone. I am doing a logistic gam (package mgcv) on a pretty large dataframe (130.000 cases with 100 variables). Because of that, the gam is fitted on a random subset of 1. Now when I want to predict the values for the rest of the data, I get the following error: > gam.basis_al