similar to: relevel expansion suggestion

Displaying 20 results from an estimated 2000 matches similar to: "relevel expansion suggestion"

2004 Dec 22
0
ordering levels: I was wrong
I was wrong about needing the Relevel from the Lexis package. The default verson of relevel does the job of reshuffling levels in any desired order, albeit with a warning (which comes from the fact that apparently only a single number had been anticipated by the designer): > testf <- factor( sample( letters[1:4], 100, replace=T ) ) > table( testf, newf=relevel( testf, ref=c(3,2,1,4) )
2004 Dec 22
4
ordering levels
Hello! I would like to know if there is a simple way to reorder levels of a given factor.Let's say that the vector testf<-factor(c("red","red","red","blue","blue","white")) levels(testf) : blue red white should have reordered levels such as levels(testf) : red blue white (this is for presentation purposes) I guess
2011 Jul 16
2
Sweave in 2.13.1
I run Windows XP. and in a command window I get: > c:\stat\r\R-2.13.1\bin\i386\Rcmd Sweave Lexis.rnw Error in length(arg) : 'arg' is missing Calls: <Anonymous> Execution halted AND: > c:\stat\r\R-2.13.1\bin\i386\Rcmd Sweave --help Error in length(arg) : 'arg' is missing Calls: <Anonymous> Execution halted BUT: > c:\stat\r\R-2.13.0\bin\i386\Rcmd Sweave
2008 Jan 17
0
New version of Epi package out (1.0.7)
A new major upgrade of the Epi package for Epidemiological data analysis has been put on CRAN, it is now at version 1.0.7. It contains an entirely new way of representing follow-up data on multiple timescales and multiple states. See the function Lexis(). Plus a lot of other useful stuff for epidemiological analysis. See more on the package homepage, www.biostat.ku.dk/~bxc/Epi Note also that
2004 Nov 09
1
survSplit: further exploration and related topics
To Danardonos concern of splitting time for records with delayed entry: This can fairly easily be accomodated, by simply splitting time in small intervals of time since entry into the study, and then compute the value of the other timescales for each of these e.g.: current.age <- time.from.entry + age.at.entry but the cut on the other timescales will not be exactly where you may want them
2005 Jul 05
0
Proposals
We just launched the Epi-package for R. It contains some functions which are not particular to epidemiology, and which you may consider moving to base/stats/graphics. They are: nice() - an extension for pretty() with some improved control for log-axes. Relevel() - extension of relevel() allowing collapsing oflevels and arbitrary reshuffling of ordering ncut() - a
2008 Jul 27
0
competing risk model with time dependent covariates under R or Splus
This message was also sent to the MEDSTATS mailing list, so here is the reply I posted to that: Philippe, The machinery to use is to split follow-up time so finely that you can safely assume that rates are constant in each interval, and then just stuff it all into a Poisson model. This allows you to use any kind of time-dependent variables as well as accommodating competing risks. In the Epi
2008 Jul 29
2
FW: Installing BRugs
A funny thing happened when I wanted a student of mine to install Brugs. Using the InstallPackages in the windows version, firts gives an erro, but trying again works flawlessly. R version is 2.7.0 on WinXP. Any explanation? Bendix Carstensen ______________________________________________ Bendix Carstensen Senior Statistician Steno Diabetes Center Niels Steensens Vej 2-4 DK-2820 Gentofte
2004 Nov 03
1
Building a package under WIN2000 / rw2.0
I have an odd problem in building a package with only R-code in it. I have a package mainly used by myself which I last build under R 1.9.0. The operation system is Win2000 5.00.2195, Service Pack 3 When I do: c:\stat\r\rw2000\bin\Rcmd install --docs=normal --build --library=c:\stat\R\bxc\library c:\stat\R\bxc\library.sources\xx then after updating help pages I get: preparing package xx for
2004 Nov 03
1
Building a package under WIN2000 / rw2.0
I have an odd problem in building a package with only R-code in it. I have a package mainly used by myself which I last build under R 1.9.0. The operation system is Win2000 5.00.2195, Service Pack 3 When I do: c:\stat\r\rw2000\bin\Rcmd install --docs=normal --build --library=c:\stat\R\bxc\library c:\stat\R\bxc\library.sources\xx then after updating help pages I get: preparing package xx for
2008 Nov 24
1
FW: read.ssd
Did not seem to reach Saikat DebRoy, this might be the forum. Bendix -----Original Message----- From: BXC (Bendix Carstensen) Sent: 24. november 2008 15:00 To: 'saikat at stat.wisc.edu'; 'stvjc at channing.harvard.edu' Subject: read.ssd It's always annoyed me that that read.ssd crashed on datasets with long variable names, but the other day a collegue of mine pointed out to
2004 May 24
2
Month names
This is how I get the month names from within R: > mon <- rep(strptime("01/01/1952", format = "%d/%m/%Y"), 12) > mon$mon <- mon$mon + 0:11 > mnam <- months(mon, abbreviate = F) > mnam [1] "januar" "februar" "marts" "april" "maj" "juni" "juli" "august"
2008 May 18
1
Figure environment and includegraphics options from Sweave
Tha handy thinb about the fig=TRUE option in Sweave is that you do not have to bother about filenames and starting and stpping the device. I want the the resulting LaTeX to look as: \begin{Schunk} \begin{Sinput} > x <- seq(-2 * pi, 2 * pi, 0.1) > plot(x, cos(x), type = "l", lwd = 4) \end{Sinput} \end{Schunk} \begin{figure} \includegraphics[width=0.6\textwidth]{xx-001}
2005 Feb 17
1
How to get interction terms first in a model
Consider the following two specifications of a model: library( splines ) x <- 1:100 y <- rnorm( 100 ) w <- rep( 1, 100 ) A <- factor( sample( 1:2, 100, replace=T ) ) B <- factor( sample( letters[1:4], 100, replace=T ) ) summary( lm( y ~ ns( x, knots=c(30, 50, 70 ), intercept=T ):A - 1 + B ) ) summary( lm( y ~ ns( x, knots=c(30, 50, 70 ), intercept=T ):A - 1 + B:w ) ) The
2001 Jan 02
1
sink() does not seem to release the file
I run Win2000, and when I try to write to a file and later use it it seems that R 1.02.0 has a firm grip on it: > version _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 2.0 year 2000 month 12 day 15
2004 Apr 06
1
predict.gl( ..., type="terms" )
When I do: > apc <- glm( D ~ ns( Ax, knots=seq(50,80,10), Bo=c(40,90) ) + + ns( Cx, knots=seq(1880,1940,20), Bo=c(1840,1960) ) + + ns( Px, knots=seq(1960,1980,10), Bo=c(1940,2000) ) + + offset( log( Y ) ), + family=poisson ) > pterm <- predict( apc, type="terms" ) > plink <- predict( apc,
2009 Apr 27
2
The .tex version of the manual in foo.Rcheck
In version 2.8.1, running Rcmd check on the package foo would leave the file foo-manual.tex in the folder foo.Rcheck. But as of 2.9.0 only foo-manual.pdf and foo-manual.log are there. Is this intentional? Anyway it is inconvenient, because I would occasionally like to include the manual at the end of a set of exercises, and this was a convenient file to \input with a few select %'s added.
2001 Oct 26
1
Bug or new concept in formatC?
As a sequel to my previous mail on cut, formatC does not produce what I have been taught is significant digits: > x <- c(1.0793,1.0796, 11.0954, 11.0736 ) > formatC(x,digits=3,format="g") [1] "1.08" "1.08" "11.1" "11.1" (3,3,3,3) significant digits OK > formatC(x,digits=3,format="f") [1] "1.079"
2005 Jun 19
0
Epi package
There is now an Epi-package on CRAN. It is intended for epidemiological analysis in R. It has its own homepage, http://www.pubhealth.ku.dk/~bxc/Epi The package has been used at the course "Statistical practise in Epidemiology with R", see http://www.pubhealth.ku.dk/~bxc/SPE. A mailing list for people using R for epidemiology, R-sig-Epi, has been set up, see
2005 Jun 19
0
Epi package
There is now an Epi-package on CRAN. It is intended for epidemiological analysis in R. It has its own homepage, http://www.pubhealth.ku.dk/~bxc/Epi The package has been used at the course "Statistical practise in Epidemiology with R", see http://www.pubhealth.ku.dk/~bxc/SPE. A mailing list for people using R for epidemiology, R-sig-Epi, has been set up, see