search for: attrassign

Displaying 5 results from an estimated 5 matches for "attrassign".

Did you mean: arrassign
2000 Apr 25
0
Wrong SEs in predict.lm(..., type="terms")
...21 0.4952442 [8] 0.7428664 0.9904885 Here is what one should get: > abs((df$x-mean(df$x)))*summary(df.lm)$coef[2,2] [1] 0.5769836 0.4327377 0.2884918 0.1442459 0.0000000 0.1442459 0.2884918 [8] 0.4327377 0.5769836 Here is the corrected code: if (type=="terms"){ asgn <- attrassign(object) beta<-coef(object) hasintercept<-attr(tt,"intercept")>0 if (hasintercept) asgn$"(Intercept)"<-NULL nterms<-length(asgn) predictor<-matrix(ncol=nterms,nrow=NROW(X)) dimnames(predictor)<-list(rownames(X),name...
2000 Apr 26
0
Wrong SEs in predict.lm(..., type="terms") (PR#528)
...428664 0.9904885 Here is what one should get: > abs((df$x-mean(df$x)))*summary(df.lm)$coef[2,2] [1] 0.5769836 0.4327377 0.2884918 0.1442459 0.0000000 0.1442459 0.2884918 [8] 0.4327377 0.5769836 Here is the relevant section of corrected code: if (type=="terms"){ asgn <- attrassign(object) beta<-coef(object) hasintercept<-attr(tt,"intercept")>0 if (hasintercept) asgn$"(Intercept)"<-NULL nterms<-length(asgn) predictor<-matrix(ncol=nterms,nrow=NROW(X)) dimnames(predictor)<-list(rownames(X),name...
1998 Apr 17
2
R-beta: lmsreg
Does R have a function like the S(plus) function, lmsreg, Least Median of Squares Regression? I am using R-0.61. Thank you, Mike Fleming mfleming at nass.usda.gov -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
1998 Apr 17
2
R-beta: lmsreg
Does R have a function like the S(plus) function, lmsreg, Least Median of Squares Regression? I am using R-0.61. Thank you, Mike Fleming mfleming at nass.usda.gov -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
1999 Aug 30
3
model.matrix()
Hi, In R I get the following: > x <- 1:9 > f <- as.factor(1:9) > i <- model.matrix(~x+f) > > attr(i, "assign") [1] 0 1 2 2 2 2 2 2 2 2 whereas in S I get the following: > attr(i, "assign") $"(Intercept)": [1] 1 $x: [1] 2 $f: [1] 3 4 5 6 7 8 9 10 Has anybody written a model.matrix function to get the same result as S?