similar to: boxcox transformations

Displaying 20 results from an estimated 300 matches similar to: "boxcox transformations"

2013 Dec 14
2
Change factor levels
Suppose I have a dataframe 'd' defined as L3 <- LETTERS[1:3] d0 <- data.frame(cbind(x = 1, y = 1:10), fac = sample(L3, 10, replace = TRUE)) (d <- d0[d0$fac %in% c('A', 'B'),]) x y fac 2 1 2 B 3 1 3 A 4 1 4 A 5 1 5 A 6 1 6 B 8 1 8 A Even though factor 'fac' in 'd' only has 2 levels, but it seems to bear the birthmark
2013 Dec 15
3
how to add a line in the graph?
t<--4:4 y<-c(5,7,10,13,15,16,14,12,11) plot(t,y,type="l") how can i add a curve y=0.83*t-0.44*t^2 in the graph? [[alternative HTML version deleted]]
2006 Nov 09
8
XEN sound emulation locks device exclusively
Hi there! My problem is the following: I am experimenting with virtualization with XEN. I am running WinXP in a HVM host with a Debian Gnu/Linux (Etch) dom0. I am also using audio emulation (sb16). This way, sounds from WinXP work fine. And here comes the problem: The HVM guest completely reserves the audio device; other software can not use it. (mplayer says this: alsa-init: using ALSA
2006 Jul 29
1
boxcox transformation
I've got a vector of data (hours to drive from a to b) y. After a qqplot I know, that they don't fit the normal probability. I would like to transform these data with the boxcox transformation (MASS), that they fit the model. When I try ybx<-boxcox(y~1,0) qqnorm(ybx) the plot is different from library (TeachingDemos) ybct<-bct(y,0) // qqnorm(ybct) How can I transform
2005 Jul 13
1
Boxcox transformation / homogeneity of variances
Dear r-helpers, Prior to analysis of variance, I ran the Boxcox function (MASS library) to find the best power transformation of my data. However, reading the Boxcox help file, I cannot figure out if this function (through its associated log-likelihood function) corrects for * normality only * or if it also induces * homogeneity of variances *. I found in Biometry (Sokal and Rohlf, p. 419)
2018 Aug 06
0
[R] MASS::boxcox "object not found"
Hmm, this looks like a buglet/infelicity in update.lm rather than MASS::boxcox per se. Moving to R-devel. I think the story is that update.lm eventually does eval(call, parent.frame()) where the call is extracted from the lm object, but call$formula is unevaluated, and does not contain environment information like formula(obj) would do. Then when the call is evaluated and parent.frame()
2008 Mar 07
1
boxcox.fit error
Hi, Thakns all for your help I am doing the next in my dataframe tabla, column pend1, because the Lilliefors (Kolmogorov-Smirnov) test give me a pvalue < alfa. (data no normal distribution). I need do a transformation with box-cox or other: > bc <- boxcox.fit(tabla$pend1) R send to me: Error in boxcox.fit(tabla$pend1) : Transformation requires positive data The summary for my data
2010 Feb 17
0
boxcox shift parameter estimation
Hello, I am implementing the BoxCox transformation for multiple regression using the function boxcox() from library MASS (this seems to be the best one). To avoid negative values in the variable to be transformed however, one must specify a shift parameter. However different choices for the value of the shift parameter result in different estimates for the exponent (lambda) and in different
2009 Nov 30
1
Scaling variables to positive values using scale() or performing BoxCox on negative data
Hi, I'm doing some work with linear models, and I've scaled my data using the scale(dataset) function. This was great at removing the skew, but I now can't perform the Box Cox transformation on the data set (using the boxcox(dataset) function), as the scaling has returned negative values. So my question is: how can I get the scale function to return a positive set of data (so I can
2007 Jun 18
3
Inverse BoxCox transformation
Hi, I can't seem to find a function in R that will reverse a BoxCox transformation. Can somebody help me locate one please? Thanks in advance. Best wishes, Des [[alternative HTML version deleted]]
2007 Dec 14
1
Help! - boxcox transformations
Hi, Hope this does not sound too ignorant . I am trying to detrend and transform variables to achieve normality and stationarity (for time series use, namely spectral analysis). I am using the boxcox transformations. As my dataset contains zeros, I found I need to add a constant to it in order to run "boxcox". I have ran tests adding several types of constants, from .0001
2004 Mar 01
1
boxcox in MASS library
Help page for boxcox function in MASS library says that the transformation is y^lambda, which is different from the Y' = log(Y) if lambda = 0 , Y' = ((Y ^ lambda) - 1)/lambda otherwise I'm used to. Is this just a help page typo ? Thanks. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
2012 Aug 14
0
error using boxcox.nls during non linear estimation
Hi all I?ve got a problem using boxcox.nls function in nlrwr packagge. I?m fitting several non linear models to these data: > x [1] 2 1 1 5 4 6 13 11 13 101 101 101 > y [1] 1.281055090 1.563609934 0.001570796 2.291579783 0.841891853 [6] 6.553951324 14.243274230 14.519899320 15.066473610 21.728809880 [11] 18.553054450 23.722637370 I used nls function with self
2018 Aug 05
2
MASS::boxcox "object not found"
Hi there, I wrote a function that wraps MASS::boxcox as: bc <- function(vec) { lam <- boxcox(lm(vec ~ 1)) lam <- lam$x[which.max(lam$y)] (vec^lam - 1)/lam } When I invoke it as: > x <- runif(20) > bc(x) Error in eval(predvars, data, env) : object 'vec' not found I have googled, and rewrote the above function as: bc <- function(vec) { dat <<-
2018 Aug 05
2
MASS::boxcox "object not found"
Hi there, I wrote a function that wraps MASS::boxcox as: bc <- function(vec) { lam <- boxcox(lm(vec ~ 1)) lam <- lam$x[which.max(lam$y)] (vec^lam - 1)/lam } When I invoke it as: > x <- runif(20) > bc(x) Error in eval(predvars, data, env) : object 'vec' not found I have googled, and rewrote the above function as: bc <- function(vec) { dat <<-
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
Hi, Firstly, apologies as I have posted this on community.rstudio.com too. I want to optimise a Box-Cox transformation on columns of a matrix (ie, a unique lambda for each column). So I wrote a function that includes the call to MASS::boxcox in order that it can be applied to each column easily. Except that I'm getting an error when calling the function. If I just extract a column of the
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
Try this for your function: BoxCoxLambda <- function(z){ y <- z b <- boxcox(y + 1 ~ 1,lambda = seq(-5, 5, length.out = 61), plotit = FALSE) b$x[which.max(b$y)] # best lambda } ***I think*** (corrections and clarification strongly welcomed!) that `~` (the formula function) is looking for 'z' in the GlobalEnv, the caller of apply(), and not finding it. It finds
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
No, I'm afraid I'm wrong. Something went wrong with my R session and gave me incorrect answers. After restarting, I continued to get the same error as you did with my supposed "fix." So just ignore what I said and sorry for the noise. -- Bert On Sat, Jul 8, 2023 at 8:28?AM Bert Gunter <bgunter.4567 at gmail.com> wrote: > Try this for your function: > >
2008 Dec 02
1
QQ plots and boxcox
Dear R People: In the DASL library, there is a story about hot dogs. Here are the data: Beef 186 495 Beef 181 477 Beef 176 425 Beef 149 322 Beef 184 482 Beef 190 587 Beef 158 370 Beef 139 322 Beef 175 479 Beef 148 375 Beef 152 330 Beef 111 300 Beef 141 386 Beef 153 401 Beef 190 645 Beef 157 440 Beef 131 317 Beef 149 319 Beef 135 298 Beef 132 253 Meat 173 458 Meat 191 506 Meat 182 473 Meat 190
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
Dear Ron and Bert, First (and without considering why one would want to do this, e.g., adding a start of 1 to the data), the following works for me: ------ snip ------ > library(MASS) > BoxCoxLambda <- function(z){ + b <- boxcox(z + 1 ~ 1, + lambda = seq(-5, 5, length.out = 101), + plotit = FALSE) + b$x[which.max(b$y)] + } > mrow <- 500