similar to: example to demonstrate benefits of poly in regression?

Displaying 20 results from an estimated 500 matches similar to: "example to demonstrate benefits of poly in regression?"

2009 Jul 09
2
r bug (?) display of data
Hi R Fans, I stumbled across a strange (I think) bug in R 2.9.1. I have read in a data file with 5934 rows and 9 columns with the commands: daten = data.frame(read.table("C:/fussball.dat",header=TRUE)) Then I needed a subset of the data file: newd = daten[daten[,1]!=daten[,2],] --> two values do not meet the logical specification and are dropped. The strange thing about it:
2012 Jul 12
2
nls question
 Hi:  Using nls how can I increase the numbers of iterations to go beyond 50.  I just want to be able to predict for the last two weeks of the year.  This is what I have:  weight_random <- runif(50,1,24)  weight <- sort(weight_random);weight weightData <- data.frame(weight,week=1:50)                          weightData plot(weight ~ week, weightData) M_model <- nls(weight ~ alpha +
2012 Aug 29
1
Help on not matching object lengths
Dear All   I have the following code set up: Code #1 a <-matrix(seq(0,8, by = sign(8-0)*0.25)) b <-matrix(seq(8,16, by = sign(16-8)*0.25)) c <-runif(1000,50,60) d <-exp(-c*a)+exp(-c*b)   This will give me the obvious error message of lengths not matching. What I am trying to do here is to have 33 rows x 1000 columns d values calculated in total. As an eaxmple for visual, this is what
2023 Nov 30
1
back tick names with predict function
?s 17:38 de 30/11/2023, Robert Baer escreveu: > I am having trouble using back ticks with the R extractor function > 'predict' and an lm() model.? I'm trying too construct some nice vectors > that can be used for plotting the two types of regression intervals.? I > think it works with normal column heading names but it fails when I have > "special"
2007 Feb 13
1
Missing variable in new dataframe for prediction
Hi, I'm using a loop to evaluate several models by taking adjacent variables from my dataframe. When i try to get predictions for new values, i get an error message about a missing variable in my new dataframe. Below is an example adapted from ?gam in mgcv package library(mgcv) set.seed(0) n<-400 sig<-2 x0 <- runif(n, 0, 1) x1 <- runif(n, 0, 1) x2 <- runif(n, 0, 1) x3 <-
2011 Apr 09
1
loop and sapply problem, help need
Dear R experts Sorry for this question M1 <- 1:10 lcd1 <- c(11, 22, 33, 44, 11, 22, 33, 33, 22, 11) lcd2 <- c(22, 11, 44, 11, 33, 11, 22, 22, 11, 22) lcd3 <- c(12, 12, 34, 14, 13, 12, 23, 23, 12, 12) #generating variables through sampling pvec <- c("PR1", "PR2", "PR3", "PR4", "PR5", "PR6", "PR7",
2011 Mar 20
4
predicting values from multiple regression
Hey List, I did a multiple regression and my final model looks as follows: model9<-lm(calP ~ nsP + I(st^2) + distPr + I(distPr^2)) Now I tried to predict the values for calP from this model using the following function: xv<-seq(0,89,by=1) yv<-predict(model9,list(distPr=xv,st=xv,nsP=xv)) The predicted values are however strange. Now I do not know weather just the model does not fit
2007 Oct 04
2
Examples
Hi to all. Where can I see workingexamples of the Prototype Javascript framework? Thank you very much. Sergio --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe
2023 Nov 30
1
back tick names with predict function
I am having trouble using back ticks with the R extractor function 'predict' and an lm() model.? I'm trying too construct some nice vectors that can be used for plotting the two types of regression intervals.? I think it works with normal column heading names but it fails when I have "special" back-tick names.? Can anyone help with how I would reference these?? Short of
2017 Jun 12
2
plotting gamm results in lattice
Dear all,? I hope that you can help me on this. I have been struggling to figure this out but I haven't found any solution. I am running a generalised mixed effect model, gamm4, for an ecology project. Below is the code for the model: model<-gamm4(LIFE.OE_spring~s(Q95, by=super.end.group)+Year+Hms_Rsctned+Hms_Poaching+X.broadleaved_woodland? ? ? ? ? ? ?+X.urban.suburban+X.CapWks,
2007 Feb 23
2
Extracting a subset from a dataframe
Good day everyone, Can anyone suggest an effective method to solve the following problem: I have 2 dataframes D1 and D2 as follows: D1: dates ws wc pwc 2005-10-19:12:00 10.8 80 81 2005-10-20:12:00 12.3 5 15 2005-10-21:15:00 12.3 3 15 2005-10-22:15:00 11.3 13 95 2005-10-23:12:00 12.3 13 2 2005-10-24:15:00 10.3 2 95 2005-10-25:15:00 10.3 2 2 D2:
2017 Jun 12
0
plotting gamm results in lattice
Hi Maria If you have problems just start with a small model with predictions and then plot with xyplot the same applies to xyplot Try library(gamm4) spring <- dget(file = "G:/1/example.txt") str(spring) 'data.frame': 11744 obs. of 11 variables: $ WATERBODY_ID : Factor w/ 1994 levels "GB102021072830",..: 1 1 2 2 2 3 3 3 4 4 ... $ SITE_ID
2013 Apr 11
2
Make barplot with error bars, anova out of a table
Helo everybody, I'm new to R and have some issues with my data in R. My raw data look like that: ID Day size 1 1 7 1 1 7.2 1 1 7.1 2 1 7.3 2 1 7.4 2 1 7.2 3 1 7 3 1 7.1 3 1 7.5 4 1 7.3 4 1 7.2 4 1 7.6 1 2 7 1 2 7.2 1 2 7.1 2 2 7.1 2 2 7.4 2 2 7.2 3 2 7.5 3 2 7.1 3 2 7.5 4 2 7.2 4 2 7.2 4 2 7.3 1 3 7.4 1 3 7.2 1 3 7.1 2 3 7.2 2 3 7.4 2 3 7.2 3 3 7.4 3 3 7.2 3 3 7.5 4 3 7.4 4 3 7.2 4 3 7.7
2003 Jun 03
3
gam questions
Dear all, I'm a fairly new R user having two questions regarding gam: 1. The prediction example on p. 38 in the mgcv manual. In order to get predictions based on the original data set, by leaving out the 'newdata' argument ("newd" in the example), I get an error message "Warning message: the condition has length > 1 and only the first element will be used in: if
2012 Mar 19
1
glm: getting the confidence interval for an Odds Ratio, when using predict()
Say I fit a logistic model and want to calculate an odds ratio between 2 sets of predictors. It is easy to obtain the difference in the predicted logodds using the predict() function, and thus get a point-estimate OR. But I can't see how to obtain the confidence interval for such an OR. For example: model <- glm(chd ~age.cat + male + lowed, family=binomial(logit)) pred1 <-
2017 Nov 21
2
help
I am working on Johansen cointegration test, using urca and var package. in the selection of var, I have got following results. >VARselect(newd, lag.max = 10,type = "none") $selection AIC(n) HQ(n) SC(n) FPE(n) 6 6 6 5 $criteria 1 2 3 4 5 6 7 8 9 AIC(n) -3.818646e+01 -3.864064e+01
2017 Nov 21
2
help
thank you for your valuable reply. I have attached my commands, results, and data with this mail..maybe it will be beneficial for you to feedback. On Tue, Nov 21, 2017 at 9:13 PM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: > Your example is incomplete... as the bottom of this and every post says, > we need to be able to proceed from an empty R environment to wherever you
2013 Jul 08
1
error in "predict.gam" used with "bam"
Hello everyone. I am doing a logistic gam (package mgcv) on a pretty large dataframe (130.000 cases with 100 variables). Because of that, the gam is fitted on a random subset of 10000. Now when I want to predict the values for the rest of the data, I get the following error: > gam.basis_alleakti.1.pr=predict(gam.basis_alleakti.1, +
2011 Nov 15
2
Models with ordered and unordered factors
Hello; I am having a problems with the interpretation of models using ordered or unordered predictors. I am running models in lmer but I will try to give a simplified example data set using lm. Both in the example and in my real data set I use a predictor variable referring to 3 consecutive days of an experiment. It is a factor, and I thought it would be more correct to consider it ordered. Below
2017 Nov 21
0
help
Your example is incomplete... as the bottom of this and every post says, we need to be able to proceed from an empty R environment to wherever you are having the problem (reproducible), in as few steps as possible (minimal). The example needs to include data, preferably in R syntax as the dput function creates... see the howtos referenced below for help with that. [1], [2], [3] You also need to