Displaying 11 results from an estimated 11 matches for "postwt".
2003 Nov 20
1
glm inconsistent behaviour (PR#5213)
...M 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, data = anorexia)
summary(anorex.1)
summary(anorex.1a)
# However the following two will not give the same results....
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 = gaussian, data=anorexia)
(I would argue that...
2005 Oct 29
2
LaTex error when creating DVI version when compiling package
...ence: a Practical
Information-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 }
2004 Jul 05
2
Why does summary does not produce output?
...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
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)
pv...
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(name, "", row.names(info)) :
argument '...
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
2008 May 05
3
troubles with R CMD check and examples under Ubuntu gutsy
...gt; ### Name: PermTest
> ### 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 o...
2018 Oct 19
0
methods(class = class(<obj>)) - improve for |cl.| > 1 ?
...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 used
> Warning in gsub(name, "", row.names(info...
2007 Nov 15
0
Package to make stepwise model selection using F or Chisq test
...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)
# grasp.step.anova is a modified version of step.gam of Sp...
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