Displaying 20 results from an estimated 800 matches similar to: "There might be something wrong with cv.lm(DAAG)"
2007 May 21
0
Is this a bug in cv.lm(DAAG) ?
Dear R-list,
I'm not sure what I've found about a function in DAAG package is a bug.
When I was using cv.lm(DAAG) , I found there might be something wrong with
it. The problem is that we can't use it to deal with a linear model with
more than one predictor variable. But the usage documentation
hasn't informed us about this.
The code illustrates my discovery:
> library(DAAG)
2011 Mar 04
4
cv.lm syntax error
Dear all,
I've tried a multiple regression, and now I want to try a cross-validation.
I obtain this error (it must be sth related to df) that I don't understand,
any help would be appreciated.
cv.lm(df= dat, lm2.52f, m=3)
Error en `[.data.frame`(df, , ynam) : undefined columns selected
lm2.52f is my lm object, dat is a dataframe where the variables involved in
.lm are
I tried CVlm
2007 May 21
4
How to compare linear models with intercept and those without intercept using minimizing adjs R^2 strategy
Dear R-list,
I apologize for my many emails but I think I know how to desctribe my
problem differently and more clearly.
My question is how to compare linear models with intercept and those without
intercept using maximizing adjusted R^2 strategy.
Now I do it like the following:
> library(leaps)
> n=20
> x=matrix(rnorm(n*3),ncol=3)
> b=c(1,2,0)
> intercept=1
>
2012 Feb 29
1
How can I avoid the warning messages when calling DAAG package?
Dear R users,
I'm a newbie for R and want to ask some basic questions.
So, after I open the R software, I typed library(DAAG). Then, I get massive
warning messages as shown below.
Why does it happen?
Also, here are few specific questions regarding each message.
1) Loading required package: MASS -> Does this mean that the MASS package
is not included in DAAG?
2) Attaching package:
2009 Oct 08
3
I can not install DAAG package . help
I use R on my Ubuntu 9.04 laptop, which was installed by "aptitude install"
way
Now i'm learning a book of R which needs "MASS" and "DAAG" installed.
So i followed the instructions:
>install.packages("MASS")
>library("MASS")
MASS works fine.
But DAAG doesn't. Anyone who could help would be appreciated a lot !
Below are my error
2009 Oct 08
3
I can not install DAAG package . help
I use R on my Ubuntu 9.04 laptop, which was installed by "aptitude install"
way
Now i'm learning a book of R which needs "MASS" and "DAAG" installed.
So i followed the instructions:
>install.packages("MASS")
>library("MASS")
MASS works fine.
But DAAG doesn't. Anyone who could help would be appreciated a lot !
Below are my error
2007 May 21
0
How to conduct a hypothesis test : Ho:|E(X)|=|E(Y)|<->H1:otherwise NOT R question
Dear R-list,
I am sorry for my shortage of stat knowlege. I want know how to conduct a
hypothesis test : Ho:|E(X)|=|E(Y)|<->H1:otherwise.
Actually, in my study, X and Y is two observations of bias,
where bias=u^hat-u, u is a parameter I concerned. Given X=(u^hat_xi - u) and
Y=(u^hat_yi - u), I want to know which bias is smaller, or the absolute
expection of which is smaller. Due to limit
2011 Feb 24
1
extract printed value from a function
Hello all,
This shouldn't be difficult, but I am not able to extract a printed
value from a function and assign it to an object.
In my case,
> library(DAAG)
> twotPermutation(c(2,3,4),c(3,6,5),plotit=F)
[1] 0.298
I would like to assign this result to an object.
Thanks,
Duarte
2013 Feb 15
0
CVlim
Can anyone help explain to me why the two codes below have different result? I thought I can use log(time)~. to replace log(time)~dist+climb+timef.I am using CVlm from DAAG package. I think nihills is preloaded with the package. Thanks in advance.
> CVlm(df=nihills, form.lm=formula(log(time)~.),plotit="Observed",m=2)Analysis of Variance Table
Response: log(time) Df Sum Sq
2012 Jul 09
1
Package DAAG
Hie
I am trying to install Package DAAG this is the error I get
> library(DAAG)
Loading required package: randomForest
Error: package 'randomForest' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) :
there is no package called 'randomForest'
what should i do
thanks
The University of Fort Hare
2007 May 17
4
R2 always increases as variables are added?
Hi, everybody,
3 questions about R-square:
---------(1)----------- Does R2 always increase as variables are added?
---------(2)----------- Does R2 always greater than 1?
---------(3)----------- How is R2 in summary(lm(y~x-1))$r.squared
calculated? It is different from (r.square=sum((y.hat-mean
(y))^2)/sum((y-mean(y))^2))
I will illustrate these problems by the following codes:
2007 May 11
1
model seleciton by leave-one-out cross-validation
Hi, all
When I am using mle.cv(wle), I find a interesting problem: I can't do
leave-one-out cross-validation with mle.cv(wle). I will illustrate the
problem as following:
> xx=matrix(rnorm(20*3),ncol=3)
> bb=c(1,2,0)
> yy=xx%*%bb+rnorm(20,0,0.001)+0
> summary(mle.cv(yy~xx,split=nrow(xx)-1,monte.carlo=2*nrow(xx),verbose=T),
num.max=1)[[1]]
mle.cv: dimension of the split subsample
2010 Oct 22
1
cv.lm() broken; cross validation vs. predict(interval="prediction")
<< repost because previous attempt was not plain text, sorry! >>
Hi Folks,
I have a pretty simple problem: after building a multivariate linear model,
I need to report my 95% confidence interval for predictions based on future
observations.
I know that one option is to use predict(interval="prediction") but
I'm curious about less parametric ways to get an estimate.
I
2007 Jun 15
2
model.frame: how does one use it?
Philipp Benner reported a Debian bug report against r-cran-rpart aka rpart.
In short, the issue has to do with how rpart evaluates a formula and
supporting arguments, in particular 'weights'.
A simple contrived example is
-----------------------------------------------------------------------------
library(rpart)
## using data from help(rpart), set up simple example
myformula <-
2010 Jan 05
1
Is the Intercept Term always in First Position?
Dear All,
I have a question about formulas and model.matrix(). If one specifies a model via a formula, the corresponding design matrix can be obtained with the model.matrix() function. For example:
x1 <- c(1,4,2,3,5)
x2 <- c(1,1,2,2,2)
myformula <- ~ x1 + factor(x2)
model.matrix(myformula)
My question is: If an intercept term is in the model (like in the example above), is it always
2010 Jan 01
1
Questions bout SVM
Hi everyone,
Can someone please help me in these questions?:
1)if I use crossvalidation with svm, do I have to use this equation to calculate RMSE?:
mymodel <- svm(myformula,data=mydata,cross=10)
sqrt(mean(mymodel$MSE))
But if I don’t use crossvalidation, I have to use the following to calculate RMSE:
mymodel <- svm(myformula,data=mydata)
mytest
2009 Oct 10
1
field names as function parameters
Hi,
I am passing a data frame and field name to a function. I've figured out how
I can create the formula based on the passed in field name, but I'm
struggling to create a vector based in that field.
for example if I hard code with the actual field name
Y = df$Target, everything works fine.
but if I use the passed in parameter name, it doesn't give me what I want,
Y = df$mytarget
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,
2009 Oct 11
3
passing field name parameter to function
Hi,
I am passing a data frame and field name to a function. I've figured out how
I can create the formula based on the passed in field name, but I'm
struggling to create a vector based in that field.
for example if I hard code with the actual field name
Y = df$Target, everything works fine.
but if I use the passed in parameter name, it doesn't give me what I want,
Y =