search for: anorexia

Displaying 15 results from an estimated 15 matches for "anorexia".

2003 Nov 20
1
glm inconsistent behaviour (PR#5213)
...d with the following code. I do not know if it is a bug, but there are inconsistencies in the behaviour in the GLM package when both an offset and multiplicative effects are present. In this situation offset should be specified directly and not in the model. See example below. library(MASS) data(anorexia) ## End Don't run # These two will give exactly the same result in the summary anorex.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt), family = gaussian, data = anorexia) anorex.1a <- glm(Postwt ~ Prewt + Treat , offset = Prewt, family = gaussian, dat...
2004 Jul 05
2
Why does summary does not produce output?
...ello, I'm a starting user of R. I have installed R 1.9.1 and winedt 5.4 If I run the example from written with winedt. The summary command does not produce any output. It does when I repeat the command manualy in R. Can someone explain me what can be the problem? library(MASS) data(anorexia) anorex.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt), family = gaussian, data = anorexia) summary(anorex.1) Regards De Herdt J
2017 Feb 16
1
possible improvement to ?with examples
A querent on StackOverflow asked about the with() function http://stackoverflow.com/questions/42283479/why-when-to-use-with-function#42283479 and asked about the example in ?with library(MASS) with(anorexia, { anorex.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt), family = gaussian) summary(anorex.1) }) which saves little or no typing relative to anorex.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt), family = gaussia...
2018 Oct 17
2
methods(class = class(<obj>)) - improve for |cl.| > 1 ?
With new "strict" settings in R-devel, the following glm() example > data(anorexia, package = "MASS") > fm <- glm(Postwt ~ Prewt + Treat + offset(Prewt), family = gaussian, data = anorexia) > methods(class = class(fm)) Warning in grep(name, row.names(info)) : argument 'pattern' has length > 1 and only the first element will be used Warning in gsub(...
2005 Oct 29
2
LaTex error when creating DVI version when compiling package
...n-Theoretic Approach, 2nd edn., Springer-Verlag, New York. 353 pp } \author{ Patrick Giraudoux and David Pleydell: pgiraudo at univ-fcomte.fr, dpleydel at univ-fcomte.fr } \seealso{ \code{\link{AIC}},\code{\link{logLik}} } \examples{ library(MASS) anorex.1 <- lm(Postwt ~ Prewt*Treat, data = anorexia) selMod(anorex.1) anorex.2 <- glm(Postwt ~ Prewt*Treat, family=gaussian,data = anorexia) selMod(anorex.2) anorex.3<-lm(Postwt ~ Prewt+Treat, data = anorexia) selMod(list(anorex.1,anorex.2,anorex.3)) } \keyword{ models }
2008 Feb 06
2
GLM coefficients
Dear all, After running a glm, I use the summary ( ) function to extract its coefficients and related statistics for further use. Unfortunately, the screen only displays a small (last) part of the results. I tried to overcome the problem by creating/saving an object "coef" for coefficients of the model and export/save it e.g. as a cvs document. While I succed with this operatiion, I do
2018 Oct 19
0
methods(class = class(<obj>)) - improve for |cl.| > 1 ?
...n that context I think it would be sensible for the function to accept more than one class. Kevin On Wed, Oct 17, 2018 at 7:15 AM Martin Maechler <maechler at stat.math.ethz.ch> wrote: > > With new "strict" settings in R-devel, the following glm() example > > > data(anorexia, package = "MASS") > > fm <- glm(Postwt ~ Prewt + Treat + offset(Prewt), family = gaussian, data = anorexia) > > methods(class = class(fm)) > Warning in grep(name, row.names(info)) : > argument 'pattern' has length > 1 and only the first element will be u...
2007 Nov 15
0
Package to make stepwise model selection using F or Chisq test
...Chisq test instead of AIC in a stepwise modelo selection. I try the grasp package using the grasp.step.anova, but It dont work. > library(grasp) Carregando pacotes exigidos: gam Carregando pacotes exigidos: splines Carregando pacotes exigidos: mda Carregando pacotes exigidos: class > data(anorexia,package="MASS") > > m1 <- glm(Postwt ~ Prewt * Treat,data=anorexia) > > m1.grasp <- grasp.step.anova(m1,scope=list(upper=~ Prewt * Treat,lower=~1),trace=1,direction="both") # # FUNCTION: grasp.step.anova # (by Splus, adapted by A. Lehmann from step.gam) #...
2010 Jan 18
1
Exporting a data.frame to excel using sqlSave - adds a character ' to values
Hi all, I am using RODB to export multiple data.frames into one excel file with multiple sheets. One thing I can't seem to unserdatand is way the command adds the character: ' To the beginning of each of my (non numeric) values. Here is an example code: library(RODBC) library(MASS) data(anorexia) save2excel <- function(x, t.name) sqlSave(xlsFile, x, tablename = t.name, rownames = FALSE) xlsFile <- odbcConnectExcel("C:\\output-table.xls", readOnly = FALSE) save2excel(anorexia, "temp") odbcCloseAll() So the output file has *'*Treat instead of: Treat In cell -...
2012 Mar 04
1
p-value from GLM
Dear all, I am fitting a GLM similar to library(MASS) anorex.1 <- glm(Treat~Postwt+Prewt,family = binomial, data = anorexia) I have found two ways of computing the p-value of the fitted model: pval1 <- 1-pchisq(anorex.1$deviance,anorex.1$df.residual) pval2 <- 1-pchisq(anorex.1$null.deviance - anorex.1$deviance, anorex.1$df.null - anorex.1$df.residual) pval2 is testing LR chi2 from the null mode...
2003 May 05
1
Error in library(MASS) : package/namespace load failed
Dear all, I have installed 1.7.0 on my Win XP and want to use MASS. But I get this error message: > library(MASS) Error in namespaceExport(ns, exports) : undefined exports: abbey, accdeaths, Aids2, Animals, anorexia, austres, bacteria, beav1, beav2, biopsy, birthwt, ... Error in library(MASS) : package/namespace load failed I therefore again downloaded VR.zip. When I extracted the files I always answered yes to the question of "Would you like to replace the existing file?" I also "Skip File&qu...
2008 May 05
3
troubles with R CMD check and examples under Ubuntu gutsy
...Test > ### Title: Permutation test for lm, lme and glm (binomial and Poisson) > ### objects > ### Aliases: PermTest PermTest.lm PermTest.lme PermTest.glm print.PermTest > ### Keywords: htest > > ### ** Examples > > library(MASS) > mylm<-lm(Postwt~Prewt,data=anorexia) > PermTest(mylm,B=250) Error: could not find function "PermTest" Execution halted If I run R CMD check --no-examples pgirmess, everything comes OK. Seems again that this check makes problem. I googled a bit on R-devel but did not find any understandable post on that... Any idea...
2001 Feb 06
3
RWin 1.2.1: Can't access sample datasets, e.g. MASS
...gt; Sys.getenv("R_HOME") R_HOME "D:\\R-WIN\\RW1021" > dir("D:\\R-WIN\\RW1021\\library\\MASS\\data") [1] "00Index" "abbey.rda" "accdeaths.rda" "Aids2.rda" [5] "Animals.rda" "anorexia.rda" "austres.rda" "beav1.rda" <snip, 'cabbages' IS there> Same result for any other dataset. All packages were installed in RW1021/library/<pkg>, some by manual download/rinst some by install.packages(). Note that after installation, the l...
2003 Apr 09
1
'Apparently' trouble with name spaces and Sweave...
...dated R-devel rsync'ed this morning and I am using the latest MASS package (which was my first thought). I am not having problems building other packages. Any thoughts? * creating vignettes ... ERROR Error in namespaceExport(ns, exports) : undefined exports: abbey, accdeaths, Aids2, Animals, anorexia, austres, bacteria, beav1, beav2, biopsy, birthwt, Boston, cabbages, caith, Cars93, cats, cement, chem, coop, cpus, crabs, Cushings, DDT, deaths, drivers, eagles, epil, farms, fdeaths, fgl, forbes, GAGurine, galaxies, gehan, genotype, geyser, gilgais, hills, housing, immer, Insurance, leuk, lh, mam...
2003 Apr 24
2
R-1.7.0 build feedback: NetBSD 1.6 (PR#2837)
R-1.7.0 built on NetBSD 1.6, but the validation test suite failed: Machinetype: Intel Pentium III (600 MHz); NetBSD 1.6 (GENERIC) Remote gcc version: gcc (GCC) 3.2.2 Remote g++ version: g++ (GCC) 3.2.2 Configure environment: CC=gcc CXX=g++ LDFLAGS=-Wl,-rpath,/usr/local/lib make[5]: Entering directory `/local/build/R-1.7.0/src/library' >>> Building/Updating