similar to: type=raw vs type=class

Displaying 20 results from an estimated 100000 matches similar to: "type=raw vs type=class"

2009 Sep 28
2
Polynomial Fitting
Hello All, This might seem elementary to everyone, but please bear with me. I've just spent some time fitting poly functions to time series data in R using lm() and predict(). I want to analyze the functions once I've fit them to the various data I'm studying. However, after pulling the first function into Octave (just by plotting the polynomial function using fplot() over
2012 Sep 11
1
plotting smoother function on raw data
Hi, I have used the mgcv library to generate a simple additive model. I want to know how to plot the function on the raw data with confidence intervals whan I have TWO variables in the model. I get it to work with one variable but not with two. I am on the limit for what I understand in R, so be gentle. I have read the help file on predict.gam, but did not get any help out of it. #My model:
2012 Jun 09
2
Help with permutation function from Turner et al. 2010 (Ecology)
Hello, I'm using R code that includes a residual permutation that was written as a supplement to the paper: Turner et al. 2010. A general hypothesis-testing framework for stable isotopes ratios in ecological studies. Ecology 91:2227-2233. The supplemental code is available at: http://www.esapubs.org/archive/ecol/E091/157/suppl-1.htm When I execute the function, no warnings are given
2004 Feb 13
5
predict function
I am using R to do a loess normalisation procedure. In 1.5.1 I used the following commands to normalise the variable "logratio", over a 2d surface (defined by coordinates x and y): > array <- read.table("121203B_QCnew.txt", header=T, sep="\t") > array$logs555<-log(array$s555)/log(2) > array$logs647<-log(array$s647)/log(2) >
2005 Mar 21
0
Training data
Hello! I would like to prepare training data to predict stock flow. Prediction should be based on 2 inputs (date, stock currency) input data : date, stock_currency 1.1.2004, 1000.00 2.1.2004, 1120.00 5.1.2004, 1230.00 7.1.2004, 1150.00 10.1.2004,1040.00 11.1.2004, 999.00 1.2.2004, 945.00 How should training instances look like? I use nnet function to train the model and predict function
2009 Feb 16
1
incl.non.slopes=FALSE does not work at predict.lm
Dear all, I am trying to estimate the prediction from a fixed effects model and their confidence intervals as well. Though I do not want to include in the prediction and at the confidence intervals the intercept. For that reason I used the argument incl.non.slopes=FALSE. But either if it is TRUE or FALSE it does not have any difference and also the system does not provide any warning. I really
2011 May 23
1
predict a MA timeseries
Hi, could anyone tell me how predict() predicts the new value(s), of a MA(1) arima-modell. its really easy to make it with an AR(1), knowing the last term, but how can i or R know the last error? It would also help if somebody could tell me how to find the "open" source of the function predict(). Thanks and sorry for my poor english. -- View this message in context:
2008 Jun 18
1
Pointwise Confidence Bounds on Logistic Regression
Hi all. I hope I have my terminology right here... For a simple lm, one can add ?pointwise confidence bounds? to a fitted line using something like >predict(results.lm, newdata = something, interval = "confidence") (I'm following DAAG page 154-155 for this) I would like to do the same thing for a glm of the logistic regression type, for instance, the example in MASS pg
2013 Jan 30
2
How does predict() calculate prediction intervals?
For a given linear regression, I wish to find the 2-tailed t-dist probability that Y-hat <= newly observed values. I generate prediction intervals in predict() for plotting, but when I calculate my t-dist probabilities, they don't agree. I have researched the issues with variance of individual predictions and been advised to use the variance formula below (in the code). I presume my
2013 Nov 21
1
Regression model
Hi, I'm trying to fit regression model, but there is something wrong with it. The dataset contains 85 observations for 85 students.Those observations are counts of several actions, and dependent variable is final score. More precisely, I have 5 IV and one DV. I'm trying to build regression model to check whether those variables can predict the final score. I'm attaching output of
2012 Mar 14
0
using predict() with poly(x, raw=TRUE)
Dear r-devel list members, I've recently encountered the following problem using predict() with a model that has raw-polynomial terms. (Actually, I encountered the problem using model.frame(), but the source of the error is the same.) The problem is technical and concerns the design of poly(), which is why I'm sending this message to r-devel rather than r-help. To illustrate:
2004 Jul 16
3
small problem with predict
hello to all! I have a small problem wit predict() for lm Let's say I have predictors x1 and x2, response y I want to predict for a new ds say dn<-data.frame(x1= seq(min(x1),max(x1),length=10),x2=rep(median(x2),10)) predict(lm(y~x1+x2),dn,se.fit=T) Error message > Error: variables 'x1', 'x2' were specified differently from the fit (I looked in the help and found
2013 Feb 05
1
Predictions from the Segmented Package
Hi, I would like to calculate the area under segmented regression lines (single breakpoints). I had thought that I could do this using the predict() function to ascertain some key x y values in order to determine the dimensions for two trapezoids (under each segment of my regression). However, I've not had any success with this and have just read online that the predict function does not work
2008 Apr 07
2
predict.lm() question
Dear R-people ... I'm a new user. I can't get predict.lm() to produce predictions for new independent data. There are some messages in archived help about this problem, but I still don't see my error after reviewing those. I understand that the new independent data must have the same name(s) as used when the model was made. In the example below, predict.lm produces the
2013 Nov 28
2
Find the prediction or the fitted values for an lm model
Hi, I would like to fit my data with a 4th order polynomial. Now I have only 5 data point, I should have a polynomial that exactly pass the five point Then I would like to compute the "fitted" or "predict" value with a relatively large x dataset. How can I do it? BTW, I thought the model "prodfn" should pass by (0,0), but I just wonder why the const is
2009 Jul 10
2
predict.glm -> which class does it predict?
Hi, I have a question about logistic regression in R. Suppose I have a small list of proteins P1, P2, P3 that predict a two-class target T, say cancer/noncancer. Lets further say I know that I can build a simple logistic regression model in R model <- glm(T ~ ., data=d.f(Y), family=binomial) (Y is the dataset of the Proteins). This works fine. T is a factored vector with levels cancer,
2008 May 16
1
SE of difference in fitted probabilities from logistic model.
I am fitting a logistic binomial model of the form glm(y ~ a*x,family=binomial) where a is a factor (with 5 levels) and x is a continuous predictor. To assess how much ``impact'' x has, I want to compare the fitted success probability when x = its maximum value with the fitted probability when x = its mean value. (The mean and the max are to be taken by level of the factor
2004 Apr 06
1
predict.gl( ..., type="terms" )
When I do: > apc <- glm( D ~ ns( Ax, knots=seq(50,80,10), Bo=c(40,90) ) + + ns( Cx, knots=seq(1880,1940,20), Bo=c(1840,1960) ) + + ns( Px, knots=seq(1960,1980,10), Bo=c(1940,2000) ) + + offset( log( Y ) ), + family=poisson ) > pterm <- predict( apc, type="terms" ) > plink <- predict( apc,
2010 Dec 25
2
predict.lrm vs. predict.glm (with newdata)
Hi all I have run into a case where I don't understand why predict.lrm and predict.glm don't yield the same results. My data look like this: set.seed(1) library(Design); ilogit <- function(x) { 1/(1+exp(-x)) } ORDER <- factor(sample(c("mc-sc", "sc-mc"), 403, TRUE)) CONJ <- factor(sample(c("als", "bevor", "nachdem",
2011 Nov 26
3
Question about randomForest
I've been using the R package randomForest but there is an aspect I cannot work out the meaning of. After calling the randomForest function, the returned object contains an element called prediction, which is the prediction obtained using all the trees (at least that's my understanding). I've checked that this prediction set has the error rate as reported by err.rate. However, if I