Displaying 20 results from an estimated 500 matches similar to: "R-beta: a bug in the lm function ?"
2008 Jun 19
1
PrettyR (describe)
#is there a way to get NA in the table of descriptive statistics instead of
the function stopping Thank you in advance
#data
x.f <- structure(list(Site = structure(c(9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L), .Label = c("BC", "HC", "RM119", "RM148", "RM179",
"RM185",
2003 Sep 24
1
stty: : Operation not supported on transport endpoint
Hi!
I am using OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f on
my Mandrake 9.1 machine. I used to run fetchmail to get emails from IRIX
6.3 system which has OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL
0x0090602f.
I had to reinstall my Mandrake, and after that ssh gives me strange error
messages.
When I run command:
ssh -f -L 1234:irixhost.somedomain.fi:110
2008 Apr 08
3
simple graphing question
#copy and paste this into R
f <- (structure(list(TKN = c(0.103011025, 0.018633208, 0.104235702,
0.074537363, 0.138286096), RM = c(215, 198, 148, 119, 61)), .Names = c("TKN",
"RM"), class = "data.frame", row.names = 25:29))
plot(f$TKN~f$RM, type="b")
I would like to reverse the X-Axis. How do I do this?
--
Let's not spend our time and resources
2011 May 16
1
Linear Discriminant Analysis error: "Variables appear constant"
Hi R experts,
I'm attempting to run Linear Discriminant Analysis using the lda function in the MASS package. I've got around 50 predictor variables and one response variable. My response variable has 5 numeric categories that represent different clusters of fish abundance data (clusters were developed using Bray-Curtis and NMDS), and my predictor variables are environmental variables that
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
Hi Bert,
On 2023-07-08 3:42 p.m., Bert Gunter wrote:
> Caution: This email may have originated from outside the organization. Please exercise additional caution with any links and attachments.
>
>
> Thanks John.
>
> ?boxcox says:
>
> *************************
> Arguments
>
> object
>
> a formula or fitted model object. Currently only lm and aov objects
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
Thanks John.
?boxcox says:
*************************
Arguments
object
a formula or fitted model object. Currently only lm and aov objects are handled.
*************************
I read that as saying that
boxcox(lm(z+1 ~ 1),...)
should run without error. But it didn't. And perhaps here's why:
BoxCoxLambda <- function(z){
b <- MASS:::boxcox.lm(lm(z+1 ~ 1), lambda = seq(-5, 5,
2013 Feb 25
1
colors to pie chart.
hello, all.
i am trying something new and am stuck. i typically go with whatever colors the pie function pops out, but i would like to customize it.
please find below a sample dataset.
##TVs per household.
TVs <- factor(c(rep("0", 1), rep("1", 16), rep("2", 14), rep("3", 12), rep("4", 3), rep("5", 2), rep("6", 2)))
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()
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
2008 Apr 11
1
Vegan dataframe not acting nicely
This is what my data looks like
DOC TOC TKN
RM119mFeb-06 1 2 3
RM61mFeb-06 2 4 6
I have this both in a .csv and .txt I have read this in with
read.csv("chemodr.csv", header=T)
and this is what I get
X dAmon DN.N Nitrite.N DOC OP P TKN TOC
1 RM215mFeb-06 0.000 0.1300 0.0000 2.5
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
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
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)
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
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
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
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:
>
>
2010 Dec 28
1
Problem applying McNemar's - Different values in SPSS and R
Hi friends,
I get different values for McNemar's test in R and SPSS. Which one should i
rely on when the p values differ.
I came across this problem when i started learning R and seriously give up
on SPSS or any other proprietary software.
Thank u in advance
Output in SPSS follows
*Crosstab*
hsc
Total
ABN
NE
ABN
tvs
ABN
Count
40
3
43
Row %
93.0%
7.0%
2011 Jan 17
2
R looks for a folder not specified
Dear R community,
I have been getting this warning message after running a function sourced
from an R script, and can't seem to work out why R is looking for a folder
that wasn't even specified (it attaches a \NA to the specified directory,
where assess_rev has not asked to do so at all. R code has been tested by
another user and that works fine).
I have tried saving the files in a new