similar to: predicting values from multiple regression

Displaying 20 results from an estimated 2000 matches similar to: "predicting values from multiple 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"
2003 Mar 06
1
Problems with variable types.
Hi all, I have problems in a dataframe variables types. Look: from a loop function: for(...){ ... dados.fin <- rbind(dados.fin, c(L=j, A=j^2, Nsp=nsps, N=length(amosfin$SP), AmT="am",NAm=nam, AMST=amst)) dados.fin <- rbind(dados.fin, c(L=j, A=j^2,
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",
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
2003 Apr 09
1
[OFF] Nested or not nested, this is the question.
Hi, sorry by this off. I'm still try to understand nested design. I have the follow example (fiction): I have 12 plots in 4 sizes in 3 replicates (4*3 = 12) In each plot I put 2 species (A and B) to reproduce. After a period I make samples in each board and count the number of individuals total (tot) and individuals A and B (nsp). Others individuals excepts A and B are in total 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,
2013 Apr 01
2
example to demonstrate benefits of poly in regression?
Here's my little discussion example for a quadratic regression: http://pj.freefaculty.org/R/WorkingExamples/regression-quadratic-1.R Students press me to know the benefits of poly() over the more obvious regression formulas. I think I understand the theory on why poly() should be more numerically stable, but I'm having trouble writing down an example that proves the benefit of this. I
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
2006 Feb 13
2
Traffic prioritization and 'class of service' for SIP
We're got a T1 from Sprint that we use for internet. During VIOP calls, if you download something, the VOIP calls break up. I found some info at Sprint for adding 'class of service', and I also have some information on configuring our Cisco routers. I've read the relevent pages on the wiki, but it seems vauge what's required and what's required by the NSP (Sprint).
2008 Oct 28
1
Source code for ppr (Projection Pursuit Regression)
Dear R users, I am looking for the source code of the implementation of ppr (Projection Pursuit Regression) in R. It will be great if citations of the source papers on which the implementation is based, are also provided. Thank you, Arvind Iyer, Grad student, Deptt. of Biomedical Engineering Viterbi School of Engineering University of Southern California, Los Angeles [[alternative HTML
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
2008 Sep 30
1
Using sub to get captions in barplots
All, I've been using "sub" (subtitle) instead of "main" such that captions are below figures produced by xyplot. This works fine and captions are on a single line. However, when I try this for bar plots with error bars (altering the error.bars function form Crawley's The R Book, see below), the captions are split on more than 1 line. Is there a way to get the
2008 Sep 06
2
Hopefully an easy error bar question
Hi im trying to add error bars to my barplots, there very basic, i have a few grapghs where the y variable is different but on all the X variable is Age (Adult and Juvenile) however this is split into two levels so i have males and females, so my graph basically has four bars on it. I know how to add eror bars for instance when there is only one level eg lookng at the diffrence between male and
2004 Aug 02
5
Samba vs NtBackup Round 3.0.5
Hi all, I experienced the same problem with 3.0.4 that Jeremy and Bruno were discussing - NTBackup unable being to connect to shares and erroring out with 'Access Denied'. I have today upgraded to 3.0.5 (using the Debian Woody packages) and that didn't fix the problem. Was the fix in 3.0.5r1 only applicable to 2000/2003 server? I am stuck in the dark ages of NT 4 here, maybe that is a
2018 Jan 30
2
Calculating angle of a polyline
Assuming your polyline is defined by two vectors, one for the x coordinates, one for the y coordinates, you can try the following library(NISTunits) polyangles <- function(xV,yV) { stopifnot( (length(xV)==length(yV)) && (length(xV) >= 3)) v <- function(i) { c( xV[i]-xV[i-1], yV[i]-yV[i-1])} vlen <- function(v) { sqrt(sum(v*v)) } lV <- rep(NA_real_,length(xV)) for