Displaying 20 results from an estimated 2070 matches for "predictores".
2010 Apr 09
0
step function
Hello I am using the step function in order to do backward selection for a
linear model of 52 variables with the following commands:
object<-lm(vars[,1] ~ (vars[,2:(ncol(predictors)+1)]-1))
BackS<-step(object,direction="backward")
but it isn't dropping any if the variables in the model, but there are lots
of not significant variables as you can see here
>
2011 Jul 29
4
finding a faster way to run lm on rows of predictor matrix
Hi, everyone.
I need to run lm with the same response vector but with varying predictor vectors. (i.e. 1 response vector on each individual 6,000 predictor vectors)
After looking through the R archive, I found roughly 3 methods that has been suggested.
Unfortunately, I need to run this task multiple times(~ 5,000 times) and would like to find a faster way than the existing methods.
All three
2024 Apr 15
2
Synthetic Control Method
Good Morning
I want to perform a synthetic control method with R. For this purpose, I
created the following code:
# Re-load packages
library(Synth)
library(readxl)
# Pfadeinstellung Excel-Blatt
excel_file_path <-
("C:\\Users\\xxxxx\\Desktop\\DATA_INVESTMENTVOLUMEN_FOR_R_WITHOUT_NA.xlsx")
# Load the Excel file
INVESTMENTVOLUME <- read_excel(excel_file_path)
#
2004 Sep 22
5
Issue with predict() for glm models
[This email is either empty or too large to be displayed at this time]
2008 Nov 11
1
simulate data with binary outcome and correlated predictors
Hi,
I would like to simulate data with a binary outcome and a set of predictors that are correlated. I want to be able to fix the number of event (Y=1) vs. non-event (Y=0). Thus, I fix this and then simulate the predictors. I have 2 questions:
1. When the predictors are continuous, I can use mvrnorm(). However, if I have continuous, ordinal and binary predictors, I'm not sure how to simulate
2012 May 26
1
Plotting interactions from lme with ggplot
I'm fitting a lme growth curve model with two predictors and their
interaction as predictors. The multilevel model is nested so that level 1 is
time within the individual, and level 2 is the individual. I would like to
plot the mean group-level trajectories at plus and minus 1 SD from the mean
of the main effects composing the interaction term. Thus, the plot should
have 4 lines (mean
2009 Apr 20
1
Random Forests: Predictor importance for Regression Trees
Hello!
I think I am relatively clear on how predictor importance (the first
one) is calculated by Random Forests for a Classification tree:
Importance of predictor P1 when the response variable is categorical:
1. For out-of-bag (oob) cases, randomly permute their values on
predictor P1 and then put them down the tree
2. For a given tree, subtract the number of votes for the correct
class in the
2017 Jun 29
3
Help : glm p-values for a factor predictor
Hello,
i am a newby on R and i am trying to make a backward selection on a
binomial-logit glm on a large dataset (69000 lines for 145 predictors).
After 3 days working, the stepAIC function did not terminate. I do not
know if that is normal but i would like to try computing a "homemade"
backward with a repeated glm ; at each step, the predictor with the max
pvalue would be
2010 Mar 09
2
looping through predictors
Dear R-ers,
I have a data frame data with predictors x1 through x5 and the
response variable y.
I am running a simple regression:
reg<-lm(y~x1, data=data)
I would like to loop through all predictors. Something like:
predictors<-c("x1","x2",... "x10)
for(i in predictors){
reg<-lm(y~i)
etc.
}
But it's not working. I am getting an error:
Error in
2009 Nov 02
2
convert list to numeric
I would like to preface this by saying that I am new to R, so I would ask
that you be patient and thorough, so that I'm not completely clueless. I am
trying to convert a list to numeric so that I can perform computations on it
(specifically mean-center the variable), but I am running into problems. I
have imported the data set into "task" (data frame). The data frame is made
of
2019 Aug 30
3
inconsistent handling of factor, character, and logical predictors in lm()
Dear R-devel list members,
I've discovered an inconsistency in how lm() and similar functions handle logical predictors as opposed to factor or character predictors. An "lm" object for a model that includes factor or character predictors includes the levels of a factor or unique values of a character predictor in the $xlevels component of the object, but not the FALSE/TRUE values
2010 Aug 07
3
plot the dependent variable against one of the predictors with other predictors as constant
Hi, folks,
Happy work in weekends >_<
My question is how to plot the dependent variable against one of the
predictors with other predictors as constant. Not for the original data, but
after prediction. It means y is the predicted value of the dependent
variables. The constane value of the other predictors may be the average or
some fixed value.
#######
y=1:10
x=10:1
z=2:11
2017 Jun 29
0
Help : glm p-values for a factor predictor
It might help if you provided the code you used. It's possible that
you didn't use direction="backward" in stepAIC(). Or if you did, it
was still running, so whatever else you try will still be slow. The
statement "R provides only the pvalues for each level" is wrong: look
at the anova() function.
Bob
On 29 June 2017 at 11:13, Beno?t PELE <benoit.pele at
2010 May 05
2
Visualizing binary response data?
Hi All,
I'm dealing with binary response data for the first time, and I'm confused
about what kind of graphics I could explore in order to pick relevant
predictors and their relation with response variable.
I have 8-10 continuous predictors and 4-5 categorical predictors. Can anyone
suggest what kind of graphics I can explore to see how predictors behave
w.r.t. response variable...
Any
2019 Aug 31
2
inconsistent handling of factor, character, and logical predictors in lm()
Dear Abby,
> On Aug 30, 2019, at 8:20 PM, Abby Spurdle <spurdle.a at gmail.com> wrote:
>
>> I think that it would be better to handle factors, character predictors, and logical predictors consistently.
>
> "logical predictors" can be regarded as categorical or continuous (i.e. 0 or 1).
> And the model matrix should be the same, either way.
I think that
2010 May 14
4
Categorical Predictors for SVM (e1071)
Dear all,
I have a question about using categorical predictors for SVM, using "svm"
from library(e1071). If I have multiple categorical predictors, should they
just be included as factors? Take a simple artificial data example:
x1<-rnorm(500)
x2<-rnorm(500)
#Categorical Predictor 1, with 5 levels
x3<-as.factor(rep(c(1,2,3,4,5),c(50,150,130,70,100)))
#Catgegorical Predictor
2009 Sep 04
3
Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1
Hello,
I am using R to analyze a large multilevel data set, using
lmer() to model my data, and using anova() to compare the fit of various
models. When I run two models, the output of each model is generated
correctly as far as I can tell (e.g. summary(f1) and summary(f2) for the
multilevel model output look perfectly reasonable), and in this case (see
below) predictor.1 explains vastly more
2012 Jun 06
0
randomForest Species Distribution Modelling
Hi,
I appologise if this is a rudimentary question and long winded but I just
wanted to let ye know where I'm comming from. I'm new to R and I'm trying to
use the 'randomForest' package to classify and predict. The Error message
that is troubling me is:
> pr<-predict(predictors,rf1, ext=ext)
Error in x[...] <- m : NAs are not allowed in subscripted assignments
In
2011 Mar 07
2
use "caret" to rank predictors by random forest model
Hi,
I'm using package "caret" to rank predictors using random forest model and draw predictors importance plot. I used below commands:
rf.fit<-randomForest(x,y,ntree=500,importance=TRUE)
## "x" is matrix whose columns are predictors, "y" is a binary resonse vector
## Then I got the ranked predictors by ranking
2013 Jul 20
2
Different x-axis scales using c() in latticeExtra
Hi,
I would like to combine multiple xyplots into a single, multipanel
display. Using R 3.0.1 in Ubuntu, I have used c() from latticeExtra
to combine three plots, but the x-axis for two plots are on a log
scale and the other is on a normal scale. I also have included
equispace.log=FALSE to clean up the tick labels. However, when I try
all of these, the x-axis scale of the first panel is used