Hello,
First of all, your question is about 'predict' but you include graphic
instructions that have nothing to do with it. They do not hurt, but the
reproducible example should also be minimal.
Second, whenever you use RNG's, you should start it with set.seed().
Now, I have edited your code
I poked at this a little bit and found that the issue exists in
stats:::C_termsform (which is called by terms.formula).
Here is a variation on the demonstrations provided by Vito and Bert earlier:
d<-data.frame(y=rnorm(10,5,.5),
age=rnorm(10),
exp=rnorm(10),
Hi
First of all you should not post in HTML.
Thank you for posting the code, however I do not understand wht exactly do you
mean by that you get many lines. I get only one with your code.
Other answers see in line
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On
Your messages about masking come from attaching your data set to the R session.
In general, that is bad practice as it leads to confusing code. It is typically
better to use the “data” argument in things like lm() to accomplish this task.
As near as I can tell, your second set of predictions is
This is the kind of thing that leads experienced R users to avoid attach for
data analysis. Read "The R Inferno".
Use the "data" argument to lm, and the "newdata" argument to predict.lm.
--
Sent from my phone. Please excuse my brevity.
On January 31, 2018 9:20:10 AM PST, WRAY NICHOLAS via R-hel
I have realised that I should have used "detach" before attaching another
dataframe, but even when I do this it's still giving me lots of lines, rather
than just one:
My code:
m<-runif(1,0,1)
m
mres<-m*(seq(1,12))
mres
ssd<-rexp(1,1)
ssd
devs<-rep(0,length(mres))
for(i in 1:length(mres)){devs[i
Hello,
I am synthesising some sales data over a twelve month period, and then trying to
use the "predict" function, firstly to generate a thirteenth month forecast with
upper and lower 95% confidence limits. So far so good
But what I then want to do is add the upper sales value at the 95th confi
Quantitative Risk Analysis with R
May 1-4, 2018
Fort Collins, Colorado, USA
Join us this spring for our QRA with R training. Our class will focus on
applied risk modeling methods using the R statistical language and will cover
the core principles of QRA and Monte Carlo simulation modeling. Both
Hello,
I'm trying to figure out a solution online but couldn't so far. I realized
that others dealt with such an error but their suggestions didn't work for
me.
So, I'm trying to run the randomForest() using this command:
rf = randomForest(classes~., data=as.matrix(train), mtry=5, ntree=2000,
im
Suggestion:
Post your query on the r-sig-mixed-models list, which is (obviously)
focused on mixed models issues, and where you are likely to find both
greater interest and expertise on such matters.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
Hi, All:
What would you suggest one use to read the data on members of the
US Congress and their positions on net neutrality from
"https://www.battleforthenet.com/scoreboard"; into R?
I found recommendations for the "rvest" package to "Easily
Harvest (Scrape) Web Pages". I tri
Hello,
currently I am trying to fit a generalized linear mixed model using the
glmmPQL function in the MASS package. I am working with the data
provided by the book from Heck, Thomas and Tabata (2012) -
https://www.routledge.com/Multilevel-Modeling-of-Categorical-Outcomes-Using-IBM-SPSS/Heck-T
Dear Lenny,
\beta_1 is the log odds ratio for age. If you want the odds ratio,
then you need to calculate it.
It looks like some reading up on glm won't harm you.
Best regards,
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN
13 matches
Mail list logo