similar to: Wrong SEs in predict.lm(..., type="terms") (PR#528)

Displaying 20 results from an estimated 200 matches similar to: "Wrong SEs in predict.lm(..., type="terms") (PR#528)"

2000 Apr 25
0
Wrong SEs in predict.lm(..., type="terms")
predict.lm(..., type="terms") gives wrong standard errors. Below, I have provided what I believe are the necessary fixes. However, there are subtleties, and the code needs careful checking. Some of the looping is surely not necessary, but it is surely best to begin with the minimum necessary changes. My tests, including checks against S-PLUS, have extended to fitting spline curves. I
2006 Mar 13
1
anova.mlm (single-model case) does not handle factors? (PR#8679)
Full_Name: Yves Rosseel Version: 2.2.1 OS: i686-pc-linux-gnu Submission from: (NULL) (157.193.116.152) Dear developers, For the single-model case, the anova.mlm() function does not seem to handle multi-parameter predictors (eg factors) correctly. A toy example illustrates the problem: Y <- cbind(rnorm(100),rnorm(100),rnorm(100)) A <- factor(rep(c(1,2,3,4), each=25)) fit <- lm(Y ~ A)
2004 Jan 30
0
Two apparent bugs in aov(y~ *** -1 + Error(***)), with suggested (PR#6510)
I think there are two bugs in aov() that shows up when the right hand side of `formula' contains both `-1' and an Error() term, e.g., aov(y ~ a + b - 1 + Error(c), ...). Without `-1' or `Error()' there is no problem. I've included and example, and the source of aov() with suggested fixes below. The first bug (labeled BUG 1 below) creates an extra, empty stratum inside
2004 Feb 02
0
Two apparent bugs in aov(y~ *** -1 + Error(***)), with (PR#6520)
I believe you are right, but can you please explain why anyone would want to fit this model? It differs only in the coding from aov(y ~ a + b + Error(c), data=test.df) and merely lumps together the top two strata. There is a much simpler fix: in the line if(intercept) nmstrata <- c("(Intercept)", nmstrata) remove the condition (and drop the empty stratum later if you
2010 Feb 27
1
Newbie help with ANOVA and lm.
Would someone be so kind as to explain in English what the ANOVA code (anova.lm) is doing? I am having a hard time reconciling what the text books have as a brute force regression and the formula algorithm in 'R'. Specifically I see: p <- object$rank if (p > 0L) { p1 <- 1L:p comp <- object$effects[p1] asgn <-
2006 Aug 12
0
anova.mlm for single model (one-way repeated measured anova)
On Sat, 12 Aug 2006, takahashi kohske wrote: > Dear list members: > > I'd like to one-way repeated measured anova by using mlm. > I'm using R-2.3.1 and my code is: > > dat<-matrix( c(9,7,8,8,12,11,8,13, 6,5,6,3,6,7,10,9, > 10,13,8,13,12,14,14,16, 9,11,13,14,16,12,15,14), > ncol=4, dimname=list(s=1:8, c=1:4)) >
2001 Jun 06
1
ppr, number of terms, and data ordering
Dear R listers -- I have several questions about using the ppr command in the modreg module. I discovered -- quite by accident -- that if I re-order the data, I obtain different results. The output below shows what I mean. I have two datasets (dataset1 and dataset2) that are identical (tested using proc compare in SAS) except for the fact that the records are in different order. Below I have
2011 Dec 19
1
pls help to print out first row of terms(model) output in example program
Greetings. I've written a convenience function for multicollinearity diagnosis. I'd like to report to the user the formula that is used in a regression. I get output like this: > mcDiagnose(m1) [1] "The following auxiliary models are being estimated and returned in a list:" [1] "`x1` ~ ." formula(fmla)() [1] "`x2` ~ ." I'd like to fill in the period
2001 Mar 20
3
Newbie question about by() -- update
Sorry about the lack of detail. I am running R v.1.2.2. I can recast my question (which I think I have partially answered) more succinctly as follows: 1. This seems to work (note that group takes values 1,2,3,4, or 5): my.newfun <- function(x) myfile <- lm(award ~ ilogemp + ilogage, x) test.by <- by(wintemp, as.factor(wintemp$group), my.newfun) 2. This does not work (leaving aside
2012 Jan 03
1
returning information from functions via attributes rather than return list
I would like to ask for advice from R experts about the benefits or dangers of using attr to return information with an object that is returned from a function. I have a feeling as though I have cheated by using attributes, and wonder if I've done something fishy. Maybe I mean to ask, where is the dividing line between attributes and instance variables? The separation is not clear in my mind
2005 Oct 27
0
Fw: Example where PPR crashes
Dear all, I have been doing tests using SVM, random forests and PPR. The data is from a data stream (that is, the data for training and for test is always increasing / changing). With SVM and random forests everything is ok, but with ppr there are situations where it crashes. For the examples I have used I noticed that if one of the variables has just one value (it can happen), it crashes for
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?
2010 Jul 29
1
Crash report: projection pursuit & predict
Folks, The projection pursuit regression function in the base R seems to crash when the optimization level is set to zero, i.e. the initial ridge terms are accepted without refitting. I encountered this problem in an out-of-sample prediction exercise using predict. But further investigation suggests the issue is with the ppr fit and predict just sppeds up the crash. The other optlevels seem to be
2001 Feb 12
2
supsmu vs. ppr
I used the supersmoother function in the modreg package as follows: super <- supsmu(ilogemp,award) Then I decided that I might want additional explanatory variables (other than ilogemp) in my model. The ppr function in modreg seemed a logical extension of supsmu from univariate to multidimensional explanatory variables. As a "check" I ran the following: pprest <-
2008 Sep 26
0
Confidence interval for binomial variance
Based on simulations, I've come up with a simple function to compute the confidence interval for the variance of the binomial variance, where the true variance is v = rho*(1-rho)/n where rho = true probability of success and n = # of trials. For x = # successes observed in n trials, p = x / n as usual. For p < 0.25 or p > 0.75, I use the proportion-based transformed confidence
2001 Mar 16
1
Newbie question about by()
Dear R list: I want to make separate estimates for each level of the variable "group." After consulting many sources I am stumped as to why the following does not work: > wintemp <- subset(alltemp, winner==1) > my.ppr <- function(x) + { + if(nrow(x) >= 50) { + pprfile <- ppr(award~ilogemp, data=x,nterms=5,max.terms=10,optlevel=3) + summary(pprfile) +
2005 Feb 16
2
problem with se.contrast()
I am having trouble getting standard errors for contrasts using se.contrast() in what appears to be a simple case to me. The following test example illustrates my problem: Lab <- factor(rep(c("1","2","3"),each=12)) Material <- factor(rep(c("A","B","C","D"),each=3,times=3)) Measurement <-
2007 Apr 18
1
[Bridge] Problem with Routed mode using br2684ctl tool
Hi, I am writing this email in sincere hope that somebody experienced similar/same problem and found solution to it. The classical bridge setup could be achieved using brctl tool, which could be found at: http://home.regit.org/br2684.html I have an ADSL CO line card Linux based [2.4.24 kernel] with 8 nas interfaces and eth0. Rather than having bridge, the decision was to have a router, which
2013 Jun 07
0
error running mvabund package
Dear All, This is my first post, and probably (and hence apologies that) my question is very silly! I'm having issues with a the mvabund package (http://cran.r-project.org/web/packages/mvabund/index.html), and would be great to get some help! Here is the code (and files are attached): library(mvabund) ##visualizing data florabund <- read.csv("CPL_floristics_abund_v1d.csv",
2012 Feb 21
0
mvabund package: errors using manyglm() and meanvar.plot()
Dear R users, I am trying to analyze multivariate abundance data using the mvabund package, but errors occur for several functions. I created a mvabund object named faunadat consisting of 8 dependent variables each containing 64 positive integer values (bact, fung, plant, omn, pred, orib, meso, spring). There are 4 factors: harv, rep, depth and lit. I then created a formula: >