search for: x_class

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

Did you mean: r_class
2020 Oct 30
1
[External] Re: Change to I() in R 4.1
...estore it exactly, including its full class specification. Right > now, and also with the previous implementation, we cannot do that > because attr(class(x), "package") is lost. So something like this: > > I <- function(x) > { > if (isS4(x)) { > x_class <- class(x) > new_classes <- c("AsIs", x_class) > attr(new_classes, "package") <- attr(x_class, "package") > structure(x, class=new_classes) > } else { > `class<-`(x, unique.default(c("AsIs&q...
2020 Oct 30
0
Change to I() in R 4.1
...ginal object has a way to restore it exactly, including its full class specification. Right now, and also with the previous implementation, we cannot do that because attr(class(x), "package") is lost. So something like this: I <- function(x) { if (isS4(x)) { x_class <- class(x) new_classes <- c("AsIs", x_class) attr(new_classes, "package") <- attr(x_class, "package") structure(x, class=new_classes) } else { `class<-`(x, unique.default(c("AsIs", oldClass(x))))...
2008 Dec 07
0
Generating output from auto.arima()
...es use auto.arima() to fit a model and output the R^2 of the model and the parameters. I know how to fit each model but I am having trouble generating the necessary output. I have this. x = c(-0.007004338981206, 0.0022575799741098, 0.0124541354151786, ...) # there are several hundred observations x_class = aut0.arima(x, d = 0, max.p = 20, min.p = 20) #define x_class as specified ARIMA order = x_class[7] #get model order However, I am unsure how to calculate the r^2 of the fitted model. How would I go about calculating that value? [[alternative HTML version deleted]]
2020 Oct 30
2
Change to I() in R 4.1
Hi Martin, On 10/26/20 04:52, Martin Maechler wrote: >> >> Hi there, >> Is that change in R-devel intentional? >> >> library(Matrix) >> m <- as(matrix(c(0, 1)), "sparseMatrix") >> >> isS4(m) >> # [1] TRUE >> >> x <- I(m) >> # Warning message: >> # In `class<-`(x,
2005 Dec 08
1
logistic regression with constrained coefficients?
...ese which gives me a distance between whole cases that is well associated with the class variable, in that "combined distance between two cases large => they most likely belong to different classes." So from my training set I construct a set of (d1(x1,y1), ..., dn(xn,yn), x_class != y_class) rows bound together as a data frame (actually I construct it by columns), and then the obvious thing to try was glm(different.class ~ ., family = binomial(), data = distance.frame) The thing is that this gives me both positve and negative coefficients, whereas the linear combinati...