similar to: convert list to numeric

Displaying 20 results from an estimated 20000 matches similar to: "convert list to numeric"

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
2012 Sep 26
1
Interaction scatterplots in ggplot with multiple regression lines
I'm trying to treat a continuous variable as discrete for plotting multiple regression lines in a scatterplot as a function of the level on the moderating variable. In the example below, there is only one regression line plotted to the whole data. I would like a separate regression line for each discrete level of the moderator. The moderator is continuous, so I'd like to treat it as
2010 Aug 03
1
releveling a numeric by factor interaction
Can anyone help me with the necessary code to relevel a numeric*factor interaction term in a linear model? I would like to report the estimate, std. error and t-value for the reference factor. First, I estimated a linear model with dummy variables and was able to retrieve model estimates for the reference factor using relevel. for example: > summary(update(mod.mod, . ~ . - dummy + +
2009 Aug 12
1
nominal to numeric function
Hi, I'm training an SVM (C-classification from e1071 library) Some of the variables in my data set are nominal. Is there some easy/automatic way to convert them to numerical representations? Thanks, -N
2009 Dec 01
2
Cut intervals (character) to numeric midpoint; regex problem
Starting with the head of a 499 element matrix whose column names are now the labels trom a cut() operation, I needed to get to a vector of midpoints to serve as the basis for plotting a calibration curve ( exp(linear predictor) vs. : > dput(head(dimnames(mtcal)[2][[1]])) # was starting point testvec <- c("(-8.616,-3.084]", "(-3.084,-2.876]",
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
2012 Mar 20
1
Remove quotes from a string to use in a variable call
Hi, I have a string that I want to use in a variable call. How can I remove the quotes and/or the string properties of the string to use it in a variable call? Here's an example: library(lme) fm2 <- lme(distance ~ age, data = Orthodont, random = ~ 1) summary(fm2) I want to update the above regression to include new predictors according to what is in a string: predictors <-
2010 Oct 23
2
convert wind direction from degrees to basic compass directions
Hello, I have a data set that includes a predictor variable "wind direction". This variable is in degrees with 0=North. I've put this predictor into a linear model and its coefficient is far from significant. I was thinking about converting this variable into 8 factors "north" "northwest" "west" and on around to see if that helps. If I add 360 to
2010 Mar 08
1
(box-) plot annotation: italic within paste?
Dear R users, in the example below the name of the genus will be displayed in the main titles using the variable predictor[i] and paste. I would like to have the genus name in italic. However all my attempts using expression and substitute failed. Does anybody know a solution? Thanks a lot in advance. bernd Acrobeles <-c(65.1,0.0,0.0,0.0,0.0,0.0) Acrobeloides
2017 Aug 18
2
R Issues with packages
so I am trying to get my R setup to run this users package. Any help would be great THANKS devtools::install_github(repo = "dadrivr/ffanalytics") I get this devtools::install_github(repo = "dadrivr/ffanalytics") Downloading GitHub repo dadrivr/ffanalytics at master from URL https://api.github.com/repos/dadrivr/ffanalytics/zipball/master Installing ffanalytics
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
2008 Dec 12
1
Concordance Index - interpretation
Hello everyone. This is a question regarding generation of the concordance index (c index) in R using the function rcorr.cens. In particular about interpretation of its direction and form of the 'predictor'. One of the arguments is a "numeric predictor variable" ( presumably this is just a *single* predictor variable). Say this variable takes numeric values.... Am I
2012 May 05
1
what is Non-numeric argument to mathematical function in prediction ?
Hi, I tried to use naivebayes in package 'e1071'. when I use following parameter, only one predictor, there is an error. > m <- naiveBayes(iris[,1], iris[,5]) > table(predict(m, iris[,1]), iris[,5]) Error in log(sapply(attribs, function(v) { : Non-numeric argument to mathematical function However, when I use two predictors, there is not error any more. > m <-
2009 Aug 20
1
Questions on factors in regression analysis
I got two questions on factors in regression: Q1. In a table, there a few categorical/factor variables, a few numerical variables and the response variable is numeric. Some factors are important but others not. How to determine which categorical variables are significant to the response variable? Q2. As we knew, lm can deal with categorical variables. I thought, when there is a categorical
2017 Aug 18
0
R Issues with packages
You just need to READ the error messages and use Google. Don't try to install tcltk. The other two packages are not available through CRAN... they are Bioconductor packages. (Not supported here... use Google.) And learn to post plain text in the future to avoid scrambling what you thought you sent before we see it. Read the Posting Guide. -- Sent from my phone. Please excuse my brevity.
2011 Dec 01
1
logistic regression - glm.fit: fitted probabilities numerically 0 or 1 occurred
Sorry if this is a duplicate: This is a re-post because the pdf's mentioned below did not go through. Hello, I'm new'ish to R, and very new to glm. I've read a lot about my issue: Warning message: glm.fit: fitted probabilities numerically 0 or 1 occurred ...including: http://tolstoy.newcastle.edu.au/R/help/05/07/7759.html
2008 Nov 24
1
lme4 and false convergence
Dear R-users, I am using the most updated package of lme4 (lme4_0.999375-2). I have a data set consisting of ~900 observations at ~440 independent survey sites. There are an unbalanced number of surveys at each site. I am attempting to develop several models evaluating the presence/absence of a species (PRES) at these random sites (SITE) using a number of predictor variables. The
2017 Aug 18
1
R Issues with packages
Thanks Jeff I got the Bioconductor packages installed and tried googling the 65535 tried some things and still get the same error. On Fri, Aug 18, 2017 at 10:59 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: > You just need to READ the error messages and use Google. > > Don't try to install tcltk. > > The other two packages are not available through CRAN...
2011 May 26
4
predictive accuracy
I am trying to develop a prognostic model using logistic regression. I built a full , approximate models with the use of penalization - design package. Also, I tried Chi-square criteria, step-down techniques. Used BS for model validation. The main purpose is to develop a predictive model for future patient population. One of the strong predictor pertains to the study design and would not
2008 Jan 31
1
random forest and vegetation data
Hi there, I am an environmental studies masters student trying to get my thesis out the door. I am also newbie at trees in general, but I like what I see in the literature about the random forest algorithm. I think I get the general gist of things, but even after reading stuff I?m unclear about how I could be getting the results I?m seeing. I obviously am missing something about how the split