Re: [R] coxph means not equal to means of model matrix

2021-09-03 Thread Bond, Stephen
the coefficient shown in the output by 1 for a sex=1? It used to be (1-.428)*coef. Thanks for clarifying. SB From: Therneau, Terry M., Ph.D. Sent: Friday, 3 September, 2021 12:37 To: Bond, Stephen Cc: R-help Subject: Re: coxph means not equal to means of model matrix [EXTERNAL

[R] coxph means not equal to means of model matrix

2021-09-03 Thread Bond, Stephen
Hi, Please, help me understand what is happening with the means of a Cox model? I have: R version 4.0.2 (2020-06-22) -- "Taking Off Again" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) getOption("contrasts") unordered

[ESS] ESS adds symbols at beginning of line

2020-12-21 Thread Bond, Stephen via ESS-help
Hello ESS friends, ESS started to put "> " after the initial "> " at the beginning of the line. Sometimes it works even though it looks strange, but sometimes it stops working and I have to copy from the source buffer and paste in my R buffer to execute lines, which is bad. Any ideas how to

Re: [R] how to add a child to a child in XML

2018-03-22 Thread Bond, Stephen
, March 22, 2018 10:40 AM To: Bond, Stephen Cc: r-help Subject: Re: [R] how to add a child to a child in XML Hi, It's a reasonable question. The answer is that it actually is included, but there are many instances across packages where multiple functions are documented on a single help page

Re: [R] how to add a child to a child in XML

2018-03-22 Thread Bond, Stephen
Big thanks. newXMLNode works great. Wonder why it is not included in the documentation. There is newXMLDoc and newXMLNamespace, but no mention of newXMLNode. Stephen From: Ben Tupper [mailto:btup...@bigelow.org] Sent: Wednesday, March 21, 2018 6:18 PM To: Bond, Stephen Cc: r-help Subject: Re

[R] how to add a child to a child in XML

2018-03-21 Thread Bond, Stephen
I am trying to add a child to a child using XML package in R. the following fails library(XML) node1 <- c("val1","val2","val3") names(node1) <- c("att1","att2","att3") root <- xmlNode("root", attrs=node1) node2 <- LETTERS[1:3] names(node2) <- paste("name",1:3,sep="") root <-

[R] offset with a factor

2017-12-20 Thread Bond, Stephen
Knowledgeable useRs, Please, advise how to use offset with a factor. I estimate monthly effects from a much bigger data set as monthly effects seem to be stable, and other variables are estimated from a small, but recent data set as there is variation in those non-seasonal coefficients. How

Re: [ESS] connection to Oracle does not work in ESS

2017-12-14 Thread Bond, Stephen
[mailto:spinu...@gmail.com] Sent: Wednesday, December 13, 2017 5:34 PM To: Bond, Stephen Cc: 'ess-help@r-project.org' Subject: Re: [ESS] connection to Oracle does not work in ESS Hi Stephen, I doubt it's problem with ESS. Running R from emacs shell and with ESS should be equivalent. Make sure

[ESS] connection to Oracle does not work in ESS

2017-12-13 Thread Bond, Stephen
On 64-bit win7: I have a DSN which tests successfully in control panel. I can connect from RGui with: con=odbcConnect("DSNname",uid="myuid",pwd="mypass") it does not work in ESS: R version 3.4.2 (2017-09-28) -- "Short Summer" Copyright (C) 2017 The R Foundation for Statistical Computing

Re: [R] update R version in windows

2017-11-10 Thread Bond, Stephen
Thanks Caitlin and Richard MH. Works great. Stephen From: Caitlin [mailto:bioprogram...@gmail.com] Sent: Friday, November 10, 2017 12:33 PM To: Bond, Stephen Subject: Re: [R] update R version in windows install.packages("installr") updateR() rather... On Friday, November 10,

Re: [R] update R version in windows

2017-11-10 Thread Bond, Stephen
This issue does not exist on Linux. My Ubuntu updates both R and all packages. Stephen B -Original Message- From: J C Nash [mailto:profjcn...@gmail.com] Sent: Friday, November 10, 2017 1:19 PM To: r-help; RICHARD M. HEIBERGER; Bond, Stephen Subject: Re: [R] update R version in windows

[R] update R version in windows

2017-11-10 Thread Bond, Stephen
Is there a utility which will allow me to upgrade my R version and update all packages from the old version? If I manually upgrade, then I have to manually re-install 50 packages. Thank you. Stephen B [[alternative HTML version deleted]] __

[R] fedback from foreach

2017-06-13 Thread Bond, Stephen
Hi useRs, I am running a foreach loop and hoped to get a small message when it hits a multiple of 1000, but it does not work. p <- foreach(i=1:1, .combine='c') %dopar% { if(i%%1000==0) print(i) sqrt(i) } What is the proper way to do it. Thanks

[R] minimal attributes to get se.fit

2016-04-04 Thread Bond, Stephen
Does anybody know what are the attributes of a glm fit object that will allow the "predict call" to produce an se.fit? I am deleting most of the attributes as the size of the final object is 5Gb and I want to reduce it to under 20Mb, but that causes as error when I ask for an se.fit .

Re: [R] lattice add a fit

2014-10-08 Thread Bond, Stephen
, October 08, 2014 12:30 PM To: Duncan Mackay Cc: R; Bond, Stephen Subject: Re: [R] lattice add a fit On Oct 7, 2014, at 9:15 PM, Duncan Mackay wrote: I'm a tad puzzled by the comments about needing to build a panel function for locfit. The various plot.locfit functions are actually lattice calls

[R] lattice add a fit

2014-10-07 Thread Bond, Stephen
What is the way to add an arbitrary fit from a model to a lattice conditioning plot ? For example xyplot(v1 ~v2 | v3,data=mydata, panel=function(...){ panel.xyplot(...) panel.loess(...,col.line=red) } ) Will add a loess smoother. Instead, I want to put a

Re: [R] lattice add a fit

2014-10-07 Thread Bond, Stephen
-Original Message- From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Tuesday, October 07, 2014 9:30 AM To: Bond, Stephen Cc: r-help@R-project.org Subject: Re: [R] lattice add a fit Fit your model in the panel function using lm and plot the fits using ?panel.points, ?panel.lines

Re: [R] Rscript fails where Rterm works

2014-06-13 Thread Bond, Stephen
Hadley, You are a genius. Stephen B -Original Message- From: Hadley Wickham [mailto:h.wick...@gmail.com] Sent: Thursday, June 12, 2014 5:18 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] Rscript fails where Rterm works Explicitly load the methods package: library

[R] Rscript fails where Rterm works

2014-06-12 Thread Bond, Stephen
I have a script which loads library(XLConnect) wb - loadWorkbook(wbname) the code works without errors when run from ESS which uses R version 3.0.1 (2013-05-16) -- Good Sport Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i386-w64-mingw32/i386 (32-bit) But fails when

[R] rJava fail

2014-05-30 Thread Bond, Stephen
R version 3.1.0 (2014-04-10) -- Spring Dance Copyright (C) 2014 The R Foundation for Statistical Computing Platform: i386-w64-mingw32/i386 (32-bit) library(rJava) Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dirname(this$RuntimeLib) error: a character vector

[R] windowing

2013-09-09 Thread Bond, Stephen
Is there a package or a command that does window aggregation like select sum(col1) over (partition by col2, col3 order by col4 rows between unbounded preceding and current row) as sum1 from table1 ; the above is Netezza syntax, but Postgre has same capability. Stephen B [[alternative

[R] odfWeave on WinXP

2013-06-04 Thread Bond, Stephen
Hello useRs, Having trouble getting odfWeave to work here. Crashing at unzipping like noted in many other posts. The unzip utility referred in the doc no longer exists (page last updated in 2004 and links are not found.) If anybody knows how to make it work on XP pls advise. I can manually

[R] unbalanced design

2013-02-15 Thread Bond, Stephen
Please, help with a formula for dealing with unbalanced design: To see the counts: aggregate(dfa$CertId,by=list(type=dfa$ComType,stat=dfa$StatusCodeId),length) type stat x 1C1 6571 2C3 28957 3C8 12390 4C 11 12415 5E 13 9 6R 1351 7E

Re: [R] obtainl survival curves for single strata

2013-02-01 Thread Bond, Stephen
-Original Message- From: Terry Therneau [mailto:thern...@mayo.edu] Sent: Friday, February 01, 2013 10:11 AM To: r-help@r-project.org; Bond, Stephen Subject: Re: obtainl survival curves for single strata Stephen, I can almost but not quite get my arms around what you are asking. A bit more

[R] obtainl survival curves for single strata

2013-01-31 Thread Bond, Stephen
Dear useRs, What is the syntax to obtain survival curves for single strata on many subjects? I have a model based on Surv(time,response) object, so there is a single row per subject and no start,stop and no switching of strata. The newdata has many subjects and each subject has a strata and

[R] coxph with smooth survival

2013-01-17 Thread Bond, Stephen
Hello users, I would like to obtain a survival curve from a Cox model that is smooth and does not have zero differences due to no events for those particular days. I have: sum((diff(surv))==0) [1] 18 So you can see 18 days where the survival curve did not drop due to no events. Is there a

Re: [R] coxph with smooth survival

2013-01-17 Thread Bond, Stephen
I also tried fitting a spline to the resulting survival curve and the result was horrible. maybe spline won't work or knots need special handling. overall, I must have the final point of the smooth survival to be same as the final point of the raw Cox survival and no flat days, the drops

[R] Rterm does not load personal library

2012-12-21 Thread Bond, Stephen
Greetings, I am trying to run a short script from a shell: c:\projects\hellRscript --default-packages=mypack X:/4Stephen/commit/curve.R X:/4Stephen/commit/run1.out Loading required package: utils Warning message: package 'RODBC' was built under R version 2.12.2 Error: could not find function

Re: [R] Rterm does not load personal library

2012-12-21 Thread Bond, Stephen
- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Friday, December 21, 2012 1:01 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] Rterm does not load personal library On 21.12.2012 18:16, Bond, Stephen wrote: Greetings, I am trying to run a short script from

Re: [R] Rterm does not load personal library

2012-12-21 Thread Bond, Stephen
...@statistik.tu-dortmund.de] Sent: Friday, December 21, 2012 1:01 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] Rterm does not load personal library On 21.12.2012 18:16, Bond, Stephen wrote: Greetings, I am trying to run a short script from a shell: c:\projects\hellRscript

[R] rms R code

2012-12-17 Thread Bond, Stephen
Greetings, useRs. Does anybody have replication of the examples from the RMS book by Harrell coded in R? I find that most the code does not work and it takes too much time to debug. For example from p.276 age.t - w[,age] f.full -

Re: [R] rms R code

2012-12-17 Thread Bond, Stephen
I have used the errata from there, but have not found where to download working R code from. Stephen -Original Message- From: Sarah Goslee [mailto:sarah.gos...@gmail.com] Sent: Monday, December 17, 2012 4:22 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] rms R code

[R] RODBC to MS SQL Server update error

2012-11-07 Thread Bond, Stephen
Is this a bug: Trying to update when the where condition gives zero rows throws an error on MS SQL server sqlQuery(pipe,select * from ComDetailCurrent where RateTypeId is null;) [1] ProcessDate SourceSystemIdAccountNumber Xref1 0 rows (or 0-length row.names)

[R] Hmisc describe error

2012-10-01 Thread Bond, Stephen
Describe fails for me with a message similar to what was an issue in 2008 and got fixed according to posts. 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) # output truncated options(chmhelp

Re: [R] Hmisc describe error

2012-10-01 Thread Bond, Stephen
...@comcast.net] Sent: Monday, October 01, 2012 12:53 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] Hmisc describe error On Oct 1, 2012, at 9:33 AM, Bond, Stephen wrote: Describe fails for me with a message similar to what was an issue in 2008 and got fixed according to posts. R

Re: [R] odfWeave fails to load

2012-05-31 Thread Bond, Stephen
the few bad apples are properly labelled and can be avoided by the community. Kind regards Stephen B -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Wednesday, May 30, 2012 4:23 AM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] odfWeave

[R] ff problems

2012-04-03 Thread Bond, Stephen
this works: bigcl - read.table(file=bigCL1.csv,sep=',',header=T , colClasses=c(rep(factor,3),numeric,NULL,integer, numeric,integer,NULL,numeric,NULL),nrow=1000) this doesn't: bigcl - read.table.ffdf(file=bigCL1.csv,sep=',',header=T ,

Re: [R] ff usage for glm

2012-04-02 Thread Bond, Stephen
] Sent: Friday, March 30, 2012 7:32 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] ff usage for glm On Sat, Mar 31, 2012 at 9:05 AM, Bond, Stephen stephen.b...@cibc.com wrote: Greetings useRs, Can anyone provide an example how to use ff to feed a very large data frame to glm

[R] ff usage for glm

2012-03-30 Thread Bond, Stephen
Greetings useRs, Can anyone provide an example how to use ff to feed a very large data frame to glm? The data.frame cannot be loaded in R using conventional read.csv as it is too big. glm(...,data=ff.file) ?? Thank you Stephen B __

[R] Weighted mad

2012-02-07 Thread Bond, Stephen
Greetings UseRs, Pls advise if there is a way to write a func that can be supplied to aggregate to compute weighted MeanAbsolute Dev (MAD). I am having trouble passing the correct weights from each group level and cannot see the code behind aggregate. But maybe 'aggregate' is not the best way

[R] glmD error

2012-01-09 Thread Bond, Stephen
I am attemting to use glmD in order to use latex(obj) afterwards. Glm works fine, glmD throws an error: conv.go - glmD(cbind(go.cnt,tot.cnt-go.cnt)~sn+rcs(relAge,4)+termfac+rate:termfac+ + I(relAge*term(term-1.25))+I((prevbal/tot.cnt)*1e-4)+prod+newmort+ +

[R] Create design matrix

2011-11-03 Thread Bond, Stephen
Greetings useRs, What is the easiest way to create a design matrix of several factor variables? Function gendata in Design seems to do that for a fitted model, but how to do that only on several factor vectors?? The result should be a df with one row for each distinct combination of levels of

Re: [R] how to install a locally built package

2011-10-06 Thread Bond, Stephen
the code in one file only the first func is loaded. Thanks everybody Stephen B -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Friday, September 16, 2011 3:43 AM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] how to install a locally built

Re: [R] how to install a locally built package

2011-10-06 Thread Bond, Stephen
Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Thursday, October 06, 2011 9:12 AM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] how to install a locally built package On 06.10.2011 15:10, Bond, Stephen wrote: Is there a way to put all R code in a single file? I have too

[R] how to install a locally built package

2011-09-15 Thread Bond, Stephen
Hello useRs, I am trying to put my funcs in a package to avoid clutter in my workspace as the funcs are now in .Rprofile. All plain R code no compilations. Using win XP with a full cygwin install and R2.12 I first did package.skeleton(mypack,list=getdfv, namespace=T) # just a single func

Re: [R] how to install a locally built package

2011-09-15 Thread Bond, Stephen
...@statistik.tu-dortmund.de] Sent: Thursday, September 15, 2011 11:43 AM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] how to install a locally built package On 15.09.2011 17:32, Bond, Stephen wrote: Hello useRs, I am trying to put my funcs in a package to avoid clutter in my

Re: [R] how to install a locally built package

2011-09-15 Thread Bond, Stephen
...@statistik.tu-dortmund.de] Sent: Thursday, September 15, 2011 12:15 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] how to install a locally built package On 15.09.2011 17:47, Bond, Stephen wrote: Uwe, That gave me the same error like CMD install install.packages(C:/Temp/mypack_1.0

[R] model formula

2011-08-11 Thread Bond, Stephen
Hello useRs, Pls help with removing a single interaction term from a formula: summary( glm.turn.2 - glm(cbind(turn.cnt,tot.cnt-turn.cnt)~sn+poly(relAge,2,raw=T)+termfac+rate:termfac,data=fix, family=quasibinomial) ) Gives Coefficients:

Re: [R] model formula

2011-08-11 Thread Bond, Stephen
in the way a glm model can be used. Thanks everybody. Stephen -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Thursday, August 11, 2011 11:40 AM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] model formula On 11.08.2011 17:27, Bond, Stephen

Re: [R] coxph fails to survfit

2011-02-04 Thread Bond, Stephen
:50100, ], type = expected) : Method not yet finished Stephen -Original Message- From: Terry Therneau [mailto:thern...@mayo.edu] Sent: Friday, February 04, 2011 8:54 AM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: coxph fails to survfit I have a model with quant vars only

[R] coxph fails to survfit

2011-02-03 Thread Bond, Stephen
I have a model with quant vars only and the error message does not make sense: (mod1 - coxph(Surv(time=strt,time2=stp,event=(resp==1))~ +incpost+I(amt/1e5)+rate+strata(termfac), subset=dt2010-08-30, data=inc,method=efron)) Call: coxph(formula = Surv(time = strt, time2 = stp, event

Re: [R] coxph fails to survfit

2011-02-03 Thread Bond, Stephen
Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Thursday, February 03, 2011 3:10 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] coxph fails to survfit On Feb 3, 2011, at 2:14 PM, Bond, Stephen wrote: I have a model with quant vars only and the error message

[R] coxph strange result

2010-11-25 Thread Bond, Stephen
The following fit does not make sense to me, please, correct me if I have a logical error. moddowsn Call: coxph(formula = Surv(start, stop, resp) ~ sn + matfac2, data = coxsn1, method = efron) coef exp(coef) se(coef) z p sn2 0.0497 1.051 0.02030 2.450

Re: [R] coxph linear.predictors

2010-11-02 Thread Bond, Stephen
will use the first call to survfit?? It's your call :-) Kind regards Stephen B -Original Message- From: Terry Therneau [mailto:thern...@mayo.edu] Sent: Thursday, October 28, 2010 6:39 PM To: Bond, Stephen; David Winsemius Cc: r-help@r-project.org Subject: Re: [R] coxph linear.predictors

Re: [R] coxph linear.predictors

2010-10-28 Thread Bond, Stephen
, October 27, 2010 1:15 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] coxph linear.predictors On Oct 27, 2010, at 12:12 PM, Bond, Stephen wrote: I would like to be able to construct hazard rates (or unconditional death prob) Hazards are not probabilities (since probabilities

Re: [R] coxph linear.predictors

2010-10-27 Thread Bond, Stephen
are appreciated. Stephen Bond -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, October 27, 2010 1:15 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] coxph linear.predictors On Oct 27, 2010, at 12:12 PM, Bond, Stephen wrote: I would

Re: [R] coxph linear.predictors

2010-10-27 Thread Bond, Stephen
of formulas, so I guess this is the spirit of SAS disguising itself as an R package. Stephen Bond -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, October 27, 2010 2:17 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] coxph

Re: [R] coxph linear.predictors

2010-10-27 Thread Bond, Stephen
...@comcast.net] Sent: Wednesday, October 27, 2010 1:15 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] coxph linear.predictors On Oct 27, 2010, at 12:12 PM, Bond, Stephen wrote: I would like to be able to construct hazard rates (or unconditional death prob) Hazards are not probabilities

[R] specify strata in survfit

2010-10-26 Thread Bond, Stephen
Is it possible to get survfit to produce the survival line for a single strata like preddow - survfit(modall,newdata=newdat,se.fit=F,strata=2) # the strata argument is being ignored in the call above Or even get a more economical/faster calculation of the hazard directly from the coxph

[R] see code of plot.survfit

2010-10-26 Thread Bond, Stephen
How can I expose the code behind plot.survfit?? Thanks a lot. Stephen B [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] aggregate with cumsum

2010-10-18 Thread Bond, Stephen
4:16 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] aggregate with cumsum On Tue, Oct 12, 2010 at 1:40 PM, Bond, Stephen stephen.b...@cibc.com wrote: Hello everybody, Data is myd - data.frame(id1=rep(c(a,b,c),each=3),id2=rep(1:3,3),val=rnorm(9)) I want to get a cumulative sum

[R] aggregate with cumsum

2010-10-12 Thread Bond, Stephen
Hello everybody, Data is myd - data.frame(id1=rep(c(a,b,c),each=3),id2=rep(1:3,3),val=rnorm(9)) I want to get a cumulative sum over each of id1. trying aggregate does not work myd$pcum - aggregate(myd[,c(val)],list(orig=myd$id1),cumsum) Please suggest a solution. In real the dataframe is huge

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

2010-09-02 Thread Bond, Stephen
- From: Frank Harrell [mailto:harre...@gmail.com] On Behalf Of Frank Harrell Sent: Thursday, September 02, 2010 4:23 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor On Thu, 2 Sep

Re: [R] sqldf syntax

2010-08-27 Thread Bond, Stephen
suggestion about data.table and report. Cheers everybody. Stephen B -Original Message- From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] Sent: Thursday, August 26, 2010 4:26 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] sqldf syntax On Thu, Aug 26, 2010 at 2:31 PM

[R] sqldf syntax

2010-08-26 Thread Bond, Stephen
Please correct the following sqldf(update esc left join forwagg on esc.ym=forwagg.Date set esc.ri2=forwagg.N1 where esc.age=12,select * from main.esc) Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: near left: syntax error) Thanks. Stephen

[R] transfer glm model from SAS

2010-07-14 Thread Bond, Stephen
Please, tell what is the best way to create an R glm object with parameters etc estimated in SAS? I have a large dataset and bigglm fails to converge, so estimation is done is SAS. However, there are a lot of predictions that are much more easily done in R and I would like to use glm.predict

Re: [R] forcing a zero level in contr.sum

2010-07-08 Thread Bond, Stephen
...@gmail.com] Sent: Thursday, July 08, 2010 4:09 AM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] forcing a zero level in contr.sum Bond, Stephen wrote: I need to use contr.sum and observe that some levels are not statistically different from the overall mean of zero. What

[R] forcing a zero level in contr.sum

2010-07-07 Thread Bond, Stephen
I need to use contr.sum and observe that some levels are not statistically different from the overall mean of zero. What is the proper way of forcing the zero estimate? It seems the column corresponding to that level should become a column of zeros. Is there a way to achieve that without me

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread Bond, Stephen
to force the coefficient on level 03 to be zero. Thank you. Stephen Bond -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, July 07, 2010 3:44 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] forcing a zero level in contr.sum On Jul

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread Bond, Stephen
there. Unbelievable. Stephen Bond -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, July 07, 2010 4:15 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] forcing a zero level in contr.sum On Jul 7, 2010, at 4:04 PM, Bond, Stephen wrote

[R] correlation in glm residuals

2010-05-20 Thread Bond, Stephen
Is there a library dealing with correlation in the residuals of a glm? I have bin3alt -glm(respalt~ t+sn+c5.vrm,data=dfalt,family=quasibinomial) bin3alt Call: glm(formula = respalt ~ t + sn + c5.vrm, family = quasibinomial, data = dfalt) Coefficients: (Intercept) t2

[R] how to remove interactions of factor with continuous var

2010-05-19 Thread Bond, Stephen
I need to remove certain interactions and keep only the one between the second level of the factor and the continuous var t2 bin4 - glm(resp2~ t*t2+c5.vrm,data=dfa,family=quasibinomial) summary(bin4) Call: glm(formula = resp2 ~ t * t2 + c5.vrm, family = quasibinomial, data = dfa) Deviance

[R] change axis labels in persp

2009-09-30 Thread Bond, Stephen
I need to change one of the axis produced by persp by giving it labels for the tickmarks. The dimension has months (a factor) so the default decimals don't look good. The graph will finally become a pdf or emf file to be embedded in a document, so persp3d will not work, I think. Thank you

[R] how to specify between group variance in lme

2009-08-24 Thread Bond, Stephen
Hello r-help, I am using lme with two specs for the variance func varComb(varFixed(~1/n)),varPower(~Age)) this produces worse forecasts than the lm model with simple weights=n I think due to the fact that the lme spec works on variance inside the group. I need to show it that 1/n scales the

Re: [R] how to specify between group variance in lme

2009-08-24 Thread Bond, Stephen
Clarification: Lm is much better than the base forecast from lme level=0, Level=1 produces a much tighter fit than lm. I was expecting that level=0 would produce something very close to lm, but it does not. [[alternative HTML version deleted]]

[R] definition of AIC and BIC in gls

2009-08-20 Thread Bond, Stephen
Hello everybody, Please help with connecting the AIC and BIC numbers printed by summary.gls to the logLik number. 1. is the logLik number the true ML or density scaling constants have been omitted? 2. what is the formula for calculating the AIC and BIC from logLik (and how can I see it)?

[R] should months be an ordered factor?

2009-08-20 Thread Bond, Stephen
This is not a purely stats question as it depends on the implementation of mixed models in R. The help says that ordered factors are treated differently than unordered, which is not very informative. More explicitly: does ordering simply imply that February follows January or that February has

[R] how to specify two variance effects in gls

2009-08-19 Thread Bond, Stephen
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 is a regressor. So using gls I have weights=varFixed(~1/n) but don't know how to include the extra