Re: [R] how to specify two variance effects in gls

2009-08-20 Thread stephenb
I got the answer: weights=varComb(varFixed(~1/n),varPower(~Age)) Bond, Stephen-2 wrote: > > Hello everybody, > > I have a dataset where each row has number of subjects and that gives me > natural weights for the variance function. Additionally I see that > variance increases with Age, which

Re: [R] glmmPQL model selection

2009-08-26 Thread stephenb
Sorry for the late reply. Just use the first 90% of your data to fit and then predict the last 10% and see which one is better. If the random effects are not good it will become very obvious. If the concern is with fixed effects then just use gls which puts the random effects in the error and s

Re: [R] glmmPQL and variance structure

2009-08-26 Thread stephenb
this is very late, but I saw this now as I am dealing with it now: I think varPower should not be needed here. The family should be one of the quasi families eg quasibinomial and that will automatically allow variance/dispersion to become a function of the fit. This is a feature of glm inherently

[R] multiplicative contraint in LS

2010-03-11 Thread stephenb
I have a model that can be estimated in nls mod.base <- deriv(~(Jan+a1*Feb+a2*Mar+a3*Apr+a4*May+a5*Jun+a6*Jul+a7*Aug+a8*Sep+a9*Oct+a10*Nov+a11*Dec)*(b2*relAge+b3*relAge^2), c("a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","a11","b2","b3"), function(a1,a2,a3,a4,a5

Re: [R] Problem with rcmd SHLIB

2010-03-11 Thread stephenb
I have never got it working with rcmd SHLIB. it is much easier to create a shared library separately with the C compiler and then load it with dyn.load the makefiles for SHLIB are quite big and going through them will give you a headache, so just use the flag for a dll when you compile. -- View

Re: [R] .RData signature

2009-07-13 Thread stephenb
any ideas? has anybody tried to recover RData files before? Duncan Murdoch-2 wrote: > > On 7/13/2009 3:38 PM, sten...@go.com wrote: >>Is there a way to identify the beginning and end of an .RData file? >>I am trying to restore lost files on opensolaris where the table of >> contents >

Re: [R] RPostgreSQL: unable to load shared library

2009-11-04 Thread stephenb
I am trying the same as the post above and the actual error is: the ordinal 284 could not be located in the dynamic link library SSLEAY32.dll I searched for that dll and it is not to be found. windows forums provide vague directions to reinstall Windows, which I cannot do because this is a compa

Re: [R] R and Python

2009-11-04 Thread stephenb
Not only RSPython does not support Windows, but it won't compile on most Unix platforms and fixing it may be more time than writing a package on your own. Like the other post, I use Python for pre-processing and then load into R. If you need text processing with line by line access you can also u

[R] text() to label points in ggplot

2009-05-14 Thread stephenb
is there a way to label points in a graph using text(locator(1),"text") after ggplot() or qplot() ? > qplot(date, psavert, data = economics, geom = "line",main="jhdjd")->p > p+opts(text(locator(1),""),new=T) does not work. -- View this message in context: http://www.nabble.com/text%28%29-t

Re: [R] Merging data frames, or one column/vector with a data frame filling out empty rows with NA's

2009-04-27 Thread stephenb
You are exceeding your max memory here, so R will not be able to do that. dump both tables into a db such as mysql and then run the query either from RMySQL or from mysql directly. then output the result and import back in R. that will take care of the merge, but not sure what will happen when y

Re: [R] Hmisc describe error

2012-10-01 Thread stephenb
The error is just a misleading error message. loading the data produced column sdate as > str(prostate) $ sdate :Classes 'labelled', 'dates' atomic [1:502] 2778 2820 2933 2999 3002 ... .. ..- attr(*, "format")= symbol ddmmmyy .. ..- attr(*, "label")= chr "Date on study" prostate$sdate <- as.

[R] unable to get bigglm working, ATTN: Thomas Lumley

2010-07-02 Thread stephenb
I am using an example posted in this help forum to work with a file. the head of the file looks like: 97 2007-03-05 2007-06-01 90 3 5.450 205500.00 999.00 999.000 0.000 0 0 97 2007-03-06 2007-06-01 90 3 5.450 205500.00 999.00 999.000 0.000 1 0 97 2007-03-07 2007-06-01 90 3 5.450 205500

Re: [R] unable to get bigglm working, ATTN: Thomas Lumley

2010-07-02 Thread stephenb
t;className" from an object of a basic class ("list") with no slots My guess is that the problem is that you use list() instead of c() for constructing your colClasses argument. In the code for reading the file that you didn't have a problem with, you used c(). -thomas

Re: [R] unable to get bigglm working, ATTN: Thomas Lumley

2010-07-02 Thread stephenb
after correcting the error spotted by Thomas, I tried again and it goes to work, but there is no result after 1 hour. is there anything I can do to debug? the dataset has 12mln rows and SAS on a server will produce results in 15 secs. I am running this on PC with XP (hence mem limit of 2.5 gigs)

Re: [R] unable to get bigglm working, ATTN: Thomas Lumley

2010-07-05 Thread stephenb
the model fails to converge after more than 3 hours ( I went home so don't know how long it took) > bigglm (formula = resp ~ relage+I(relage^2)+termfac+ri , + data = a, family = binomial(link='logit')); Large data regression model: bigglm(formula = resp ~ relage + I(relage^2) + termfac + ri,

Re: [R] unable to get bigglm working, ATTN: Thomas Lumley

2010-07-05 Thread stephenb
I decided to give it 1 more variable, which is strongly significant to help the optimization and it throws: > bigglm (formula = resp ~ relage+relage2+termfac+ri+sn , + data = a, family = binomial(link='logit')); Error in bigglm.function(formula = resp ~ relage + relage2 + termfac + : mode

Re: [R] Prediction confidence intervals for a Poisson GLM

2010-09-09 Thread stephenb
I am following up on an old post. Please, comment: it appears that predict(glm.model,type="response",se.fit=T) will do all the conversions and give se on the scale of the response. This only takes into account the error in parameter estimation. what a "prediction" interval is meant to be usual

Re: [R] Data Manipulations and SQL

2010-08-26 Thread stephenb
Greetings Gabor, is it possible to open a channel to a data frame in the default environment? there are cases when using a sql update statement is the simplest alternative, so instead of dumping the df and then updating and then reimporting it I would like to update the df directly in R. Thank y

Re: [R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor

2010-09-02 Thread stephenb
sorry to bump in late, but I am doing similar things now and was browsing. IMHO anova is not appropriate here. it applies when the richer model has p more variables than the simpler model. this is not the case here. the competing models use different variables. you are left with IC. by transfo

Re: [R] Example function for bigglm (biglm) data input from file

2010-05-25 Thread stephenb
Richard, do you have an example for an ODBC connection? Thank you Stephen -- View this message in context: http://r.789695.n4.nabble.com/R-Example-function-for-bigglm-biglm-data-input-from-file-tp816496p2230710.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] aggregate with cumsum

2011-02-25 Thread stephenb
Bill, what will be the fastest way to output not just single lines but small data frames of about 60 rows? I prefer writing to a text file because the final output is large 47k times 60 rows and since I do not know the size of it I have to use rbind to build the object which creates the memory p

[R] odfWeave fails to load

2012-05-29 Thread stephenb
R version 2.15.0 (2012-03-30) Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-pc-mingw32/i386 (32-bit) package ‘survey’ successfully unpacked and MD5 sums checked package ‘odfWeave.survey’ successfully unpacked and MD5 sums checked > library(odfWe

[R] dll problem

2008-07-14 Thread stephenb
I am trying to load a dll compiled with the latest cygwin into R 2.7.0 R version 2.7.0 (2008-04-22) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 I have: Sys.getenv("Path")