Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 54184

Use this tag for any *on-topic* question that (a) involves `R` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `R`.

1
vote
Earth will estimate prediction intervals for you. Do it like this: mod = earth(y~x,data=dat, ncross=30, nfold=3, varmod.method="lm") plotmo(mod, pt.col=1, level=.95) # show prediction intervals su …
answered Jun 12 '15 by Stephen Milborrow
1
vote
The plot_glmnet function in the plotmo package allows more flexibility in the way labels are handled and can handle the issues you mention. For example, the following code library(glmnet) mod <- glmn …
answered Nov 30 '16 by Stephen Milborrow
1
vote
Prediction intervals are supported by earth version 4.0.0 (Dec 2014) and higher. See the vignette Variance models in earth that comes with the earth package. You can generate plots such as the followi …
answered May 1 '15 by Stephen Milborrow
1
vote
For a multi-class model, use the rpart.plot package to show at each leaf the predicted class and the probabilities for each class. For example: data(iris) library(rpart) a <- rpart(Species~., data=i …
answered May 19 '18 by Stephen Milborrow
1
vote
Some of your predictors are factors, and you therefore have to specify the factor level names in the PREDICTORS and PARENTS variables. So incorporate location.id11003 location.id11005 location.id11006 …
answered Jul 13 '18 by Stephen Milborrow
4
votes
As mentioned in the comments above, the gbm model would be better with some parameter tuning. An easy way to spot problems in the model and the need for such parameters is to generate some diagnostic …
answered Nov 29 '16 by Stephen Milborrow
3
votes
Since we don't have access to your data, it's difficult to give a definitive answer. However, if you have more than one variable in the input matrix x, then this kind of behaviour (where the model cu …
answered Jan 25 '18 by Stephen Milborrow
3
votes
The rpart.plot package version 3.0 (July 2018) has a function rpart.rules for generating a set of rules for a tree. For example library(rpart.plot) fit <- rpart(Kyphosis ~ Age + Number + Start, data= …
answered Aug 3 '18 by Stephen Milborrow
4
votes
perspplot (1,2,3 are the integers used internally by R to represent the factor). Axis labels: Get more information on the axes by invoking persp with ticktype="detailed". To do this, pass …
answered Feb 21 '18 by Stephen Milborrow
2
votes
To elaborate slightly on Eric Farng's comment that removing outliers until the fit of the model is maximized is not recommended: The fundamental problem with tweaking the data until you get a good …
answered Jun 12 '15 by Stephen Milborrow
1
vote
Earth will easily handle your 20 thousand by 100 matrix. That model requires less than a quarter of a gig of memory. The inst/slowtests/test.big.R file in the earth test suite has a model with 6 m …
answered May 1 '15 by Stephen Milborrow