similar to: predict.mlm bug?

Displaying 20 results from an estimated 20000 matches similar to: "predict.mlm bug?"

2003 Sep 19
1
predict for mlm does not work properly
Hello, I've just fitted a model with multi-responses, and I get an object of class "lm" "mlm". My problem is that as soon as I invoke the predict method for a dataframe "newdata", the methods runs and give me back prediction at the fitting points but not for newdata. Does someone has an explanation for this behavior, and some ideas to make predict.mlm work
2001 Aug 12
0
predict.mlm: Error: Object "X" not found (PR#1049)
predict.mlm fails with the error: Object "X" not found. CAUSE: looking at the predict.mlm function, we have: x <- model.matrix(object, newdata) two lines later, we have: pred <- X[, piv, drop=FALSE] %*% object$coefficients[piv,] SOLUTION(?): change the case of one of the x's, since it seems like what is meant in the second line is lowercase x... platform:
2007 Mar 16
3
Unhidden predict methods
Hi, I've noted that not all `predict' methods are hidden in the namespace: > methods("predict") [1] predict.ar* predict.Arima* [3] predict.arima0* predict.glm [5] predict.HoltWinters* predict.lm [7] predict.loess* predict.mlm [9] predict.nls* predict.poly [11] predict.ppr* predict.prcomp* [13]
2018 Apr 27
5
predict.glm returns different results for the same model
Hi all, Very surprising (to me!) and mystifying result from predict.glm(): the predictions vary depending on whether or not I use ns() or splines::ns(). Reprex follows: library(splines) set.seed(12345) dat <- data.frame(claim = rbinom(1000, 1, 0.5)) mns <- c(3.4, 3.6) sds <- c(0.24, 0.35) dat$wind <- exp(rnorm(nrow(dat), mean = mns[dat$claim + 1], sd = sds[dat$claim + 1])) dat <-
2010 Apr 16
1
Multiple comparisons on Anova.mlm object
I would like to perform multiple comparisons or post-hoc testing on the independent variable in an Anova.mlm object generated by the Anova function of the car package. I have defined a multivariate linear model and subsequently performed a repeated measures ANOVA as per the instructions in section #3 of the following comprehensive tutorial on the subject from the Gribble lab at UWO:
2011 Oct 26
2
Error in summary.mlm: formula not subsettable
When I fit a multivariate linear model, and the formula is defined outside the call to lm(), the method summary.mlm() fails. This works well: > y <- matrix(rnorm(20),nrow=10) > x <- matrix(rnorm(10)) > mod1 <- lm(y~x) > summary(mod1) ... But this does not: > f <- y~x > mod2 <- lm(f) > summary(mod2) Error en object$call$formula[[2L]] <- object$terms[[2L]]
2000 Oct 04
3
R 1.2 build
I've been trying to build a bundle with the R-devel snapshot from yesterday. (Yes I know it is unstable and just tell me if I shouldn't be trying to do this yet.) It is failing with the message tar : /dev/rmt/0 : Permission denied It happens after "removing junk files" and just after the message "building dse_2000.9-1.tar.gz" It looks to be coming from the line in
2018 Jul 20
3
Should there be a confint.mlm ?
It seems that confint.default returns an empty data.frame for objects of class mlm. For example: ``` nobs <- 20 set.seed(1234) # some fake data datf <- data.frame(x1=rnorm(nobs),x2=runif(nobs),y1=rnorm(nobs),y2=rnorm(nobs)) fitm <- lm(cbind(y1,y2) ~ x1 + x2,data=datf) confint(fitm) # returns: 2.5 % 97.5 % ``` I have seen proposed workarounds on stackoverflow and elsewhere, but
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)
2011 Mar 28
2
mgcv gam predict problem
Hello I'm using function gam from package mgcv to fit splines. ?When I try to make a prediction slightly beyond the original 'x' range, I get this error: > A = runif(50,1,149) > B = sqrt(A) + rnorm(50) > range(A) [1] 3.289136 145.342961 > > > fit1 = gam(B ~ s(A, bs="ps"), outer.ok=TRUE) > predict(fit1, newdata=data.frame(A=149.9), outer.ok=TRUE) Error
2006 Sep 01
1
difference between ns and bs in predict.glm
I am fittling a spline to a variable in a regression model, I am then using the predict.glm funtion to make some predictions. When I use bs to fit the spline I don't have any problems using the predict.glm function however when I use ns I get the following error: Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ (found for
2007 Jan 30
3
silent loading of packages
I would like to turn off all the messages during library(aPackage) or require(aPackage) I tried different commands: invisible, capture.output, sink but none of them is working. For example, loading VGAM, gives a lot of unnecessary messages: > library(VGAM) Attaching package: 'VGAM' The following object(s) are masked from package:splines : bs The
1998 Apr 02
2
f2c
I have a problem with my dynamically loaded code in R not finding pow_ii, which for some time I thought was because library f2c is not on my Sparcstation. However, I have now been experiencing the same problem in Linux, with all the proper libraries in place. My incomplete understanding of elf and shared libraries does not help, but when compiling a complete program I usually muddle through.
2009 Jan 30
3
Q about how to use Anova.mlm
Hi, Am newish to stats and R, so I certainly appreciate any help. Basically I have 50 inidividuals whom I have 6 photos each of their optic nerve head. I want to check that the orientation of the nerve head is consistent, ie the 6 replicates show minimal or preferably no rotation differences. I'll draw an arbitrary line between some blood vessels (same reference in each set of replicates) and
2007 May 30
2
S4 assignment \alias and \usage
What is the Rd file alias and usage syntax for an S4 assignment method? I have been trying variations on \alias{TSdoc<-,default-method} \usage{ \S4method{TSdoc}{default}(x) <- value but so far I have not got it right according to various codoc, etc, checks. Paul Gilbert ==================================================================================== La version fran?aise
2008 May 30
1
robust mlm in R?
I'm looking for something in R to fit a multivariate linear model robustly, using an M-estimator or any of the myriad of other robust methods for linear models implemented in robustbase or methods based on MCD or MVE covariance estimation (package rrcov). E.g., one can fit an mlm for the iris data as: iris.mod <- lm(cbind(Sepal.Length, Sepal.Width, Petal.Length, Petal.Width) ~ Species,
1998 Nov 18
4
more on "[<-"
"[<-" in R 0.63 does not appear to strip attributes, whereas Splus and previous versions of R did. Paul _____ R 0.63: > data <- matrix(rnorm(300),100,3) > attr(data, "tframe") <- c(1981.50, 2006.25 , 4.00) > attributes(data) $dim [1] 100 3 $tframe [1] 1981.50 2006.25 4.00 > z <- data[10:90,] > attributes(z) $dim [1] 81 3 $tframe [1]
2018 Mar 07
3
Names of variables needed in newdata for predict.glm
I would like to extract the names, modes [numeric/factor] and levels of variables needed in a data frame supplied as newdata= argument to predict.glm() Here is a small example illustrating my troubles; what I want from (both of) the glm objects is the vector c("x","f","Y") and an indication that f is a factor: library( splines ) dd <- data.frame( D =
1999 Dec 01
2
./config.site
I just tried to load r-devel (using rsync -r rsync.r-project.org::r-devel) and I get "operation not permitted" when I try ./configure. It appears the permissions and sticky bits are messed up again. Paul Gilbert -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send
2011 Sep 20
2
Multivariate spline regression and predicted values
Hello, I am trying to estimate a multivariate regression of Y on X with regression splines. Y is (nx1), and X is (nxd), with d>1. I assume the data is generated by some unknown regression function f(X), as in Y = f(X) + u, where u is some well-behaved regression error. I want to estimate f(X) via regression splines (tensor product splines). Then, I want to get the predicted values for some new