A non-text attachment was scrubbed... Name: not available Type: text Size: 2304 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/r-help/attachments/19980216/52eae549/attachment.pl
R-beta: Various R Questions and Comments
3 messages · Doug Morse, Peter Dalgaard, Thomas Lumley
morse at pobox.com (Doug Morse) writes:
Res.Df Res.Sum-Sq Df Sum-Sq F Pr(>F)
1 21 2152
2 19 2012 2 139.9 0.6609 0.5279
-----
It represents a test of whether beta1 = -1.0 and beta2 = 0.0
using the generalized linear test statistic (see "Applied
Wouldn't this be better done using offsets?
I'm not sure what you mean by 'offsets'. Could you elaborate a bit?
Whoops, sorry. That feature is glm only (I wonder why...). Basically:
glm(formula = Ozone ~ Day)
..
Coefficients:
Value Std.error t value P(>|t|)
(Intercept) 42.9039 6.2883 6.8228 0.0000
Day -0.0499 0.3531 -0.1412 0.8879
glm(formula = Ozone ~ Day + offset(-Day/20))
..
Coefficients:
Value Std.error t value P(>|t|)
(Intercept) 42.9039 6.2883 6.8228 0.0000
Day 0.0001 0.3531 0.0004 0.9997
(lm() just silently disregards the offset term. Needs fixing, obviously...)
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 16 Feb 1998, Doug Morse wrote:
Peter Dalgaard BSA wrote:
morse at pobox.com (Doug Morse) writes:
4. Anovalist.lm
..
For example, the following should be allowed:
-----
Analysis of Variance Table
Model 1: Satisfaction + Age ~ Anxiety
Model 2: Satisfaction ~ Age + Severity + Anxiety
Res.Df Res.Sum-Sq Df Sum-Sq F Pr(>F)
1 21 2152
2 19 2012 2 139.9 0.6609 0.5279
-----
It represents a test of whether beta1 = -1.0 and beta2 = 0.0
using the generalized linear test statistic (see "Applied
Wouldn't this be better done using offsets?
I'm not sure what you mean by 'offsets'. Could you elaborate a bit?
An offset is a term in the model with coefficient set at 1. There are all sorts of uses, but one is exactly what you want: testing a coefficient against a non-zero hypothesised value. Unfortunately lm() doesn't implement offsets, but glm() does Your two models are glm(Satisfaction~Age+Severity+Anxiety,family=gaussian()) glm(Satisfaction~offset(-1.0*Age)+Anxiety,family=gaussian()) which could be compared with anova.glm (the family=gaussian()) option is not necessary as it is the default) Thomas Lumley -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._