similar to: Problem with fitted.value function

Displaying 20 results from an estimated 20000 matches similar to: "Problem with fitted.value function"

2007 Aug 08
1
prediction using gam
I am fitting a two dimensional smoother in gam, say junk = gam(y~s(x1,x2)), to a response variable y that is always positive and pretty well behaved, both x1 and x2 are contained within [0,1]. I then create a new dataset for prediction with values of (x1,x2) within the range of the original data. predict(junk,newdata,type="response") My predicted values are a bit strange
2011 Jan 27
2
Extrapolating values from a glm fit
Dear R-help, I have fitted a glm logistic function to dichotomous forced choices responses varying according to time interval between two stimulus. x values are time separation in miliseconds, and the y values are proportion responses for one of the stimulus. Now I am trying to extrapolate x values for the y value (proportion) at .25, .5, and .75. I have tried several predict parameters, and they
2010 Jan 18
2
Predict polynomial problem
I have a function that fits polynomial models for the orders in n: lmn <- function(d,n){ models=list() for(i in n){ models[[i]]=lm(y~poly(x,i),data=d) } return(models) } My data is: > d=data.frame(x=1:10,y=runif(10)) So first just do it for a cubic: > mmn = lmn(d,3) > predict(mmn[[3]]) 1 2 3 4 5 6 7 8
2006 May 24
1
Regression line limited by the range of values
Thankyou very much Marc for that nifty little script. When I use it on my real dataset though, the lines are fat in the middle and thinner towards the ends. I guess it's because "lines" draw one fitted line for each x, and if you have hundreds of x, this turns into a line that is thicker that it should be (due to rounding errors perhaps). I got the tip to use
2020 Feb 12
6
[RFC] Optional parameter tuples
Hi, this is an RFC for optional, named parameter tuples for intrinsics. The proposed syntax is: %z = call @llvm.some.intrinsic(%a, %b) optional_tuple(%x, %y, %z) where from the perspective of the call site %x, %y and %z are simply additional parameters. Optional parameter tuples would be very useful for constrained fp intrinsics and vector predication. Some examples: ; Default fpenv fadd
2023 Oct 26
2
Plot for 10 years extrapolation
Dear R-Experts, Here below my R code working but I don't know how to complete/finish my R code to get the final plot with the extrapolation for the10 more years. Indeed, I try to extrapolate my data with a linear fit over the next 10 years. So I create a date sequence for the next 10 years and store as a dataframe to make the prediction possible. Now, I am trying to get the plot with the
2006 Apr 21
1
AIC and numbers of parameters
Hi. I'm fairly new to R and have a quick question regarding AIC, logLik and numbers of parameters. I see that there has been some correspondence on this in the past but none of the threads seem to have been satisfactorily resolved. I have been trying to use R to obtain AIC for fitted models and then to extrapolate to AICc. For example, using simple x-y regression data, I fitted a
2010 Nov 19
1
Sampling from multi-dimensional kernel density estimation
Hi, I'd like to use a three-dimensional dataset to build a kernel density and then sample from the distribution. I already used the npudens function in the np package to estimate the density and plot it: fit<-npudens(~x+y+z) plot(fit) It takes some time but appears to work well. How can I use this to evaluate the fitted function at a certain point, e.g. (x=1, y=1, z=1)?
2011 Apr 07
1
comparing ARIMA model to data
hi, i am trying to teach myself about ARIMA models. i have followed examples from a number of sources and have more or less got the hang of how it works. i would like to compare the output from the fitted model to the original data. is this possible? or even a meaningful thing to do? to be clear, for example, having generated a fit to some data using > fit <- arima(LakeHuron, order = c(1,
2000 Sep 19
1
Graphing measured and fitted distributions
Hi All, What I would like to do is the following: a) fit a probability function to a measured data set. This would be user specified, e.g., normal, lognormal, etc. and then b) take the probability function and plot it with the histogram of the measured data set. This function would be displayed as a smooth curve. This would involve "re-sizing" the probability function to match
2009 Mar 04
3
best fit line
Dear R Community, I am plotting this simple x-y plot (raw data & plot attached). I cant fit a linear regression line to it. I have to figure out what is the best fit for this graph. Is there a way to tell which regression to use for this kind of data? Also, after selecting the best fit model, I need to extrapolate what could be the other possible data points. I am new to R. Could anyone
2010 Dec 22
2
Fitting a Triangular Distribution to Bivariate Data
Hello, I have some xy data which clearly shows a non-monotonic, peaked triangular trend. You can get an idea of what it looks like with: x<-1:20 y<-c(2*x[1:10]+1,-2*x[11:20]+42) I've tried fitting a quadratic, but it just doesn't the data-structure with the break point adequately. Is there anyway to fit a triangular or 'tent' function to my data in R? Some sample code
2008 May 16
1
HoltWinters fitted level parameter not bounded between 0 and 1 (PR#11469)
Full_Name: John Bodley Version: 2.5.1 (2007-06-27) OS: Windows XP Submission from: (NULL) (12.144.182.66) I was fitting a number of time series in R using the stats::HoltWinters method to define a single exponential smoothing model, i.e., beta = gamma = 0. I came across an example where the fitted value of alpha was not defined in the [0, 1] interval which seems to violate the lower and upper
2005 Sep 22
1
How does the jitter buffer "catch up"?
> Hello, Hi :) First off, could you try to set your email client to break long lines before transmitting? In my (somewhat outdated) pine, the lines appear as VERY long lines when I try to reply, making it hard to read :) Minor detail though, I should probably fix pine. Some day. > The way you describe how the jitter buffer should be implemented makes me > wonder: How does the
2007 Jun 13
2
Fitted Value Pareto Distribution
I would like to fit a Pareto Distribution and I am using the following codes. I thought the fitted (fit1) should be the fitted value for the data, is it correct? As the result of the "fitted" turns out to be a single value for all. fit=vglm(ycf1 ~ 1, pareto1(location=alpha), trace=TRUE, crit="c") fitted(fit) The result is fitted(fit) [,1] [1,] 0.07752694
2007 Jul 24
4
values from a linear model
Dear R users, how can I extrapolate values listed in the summary of an lm model but not directly available between object values such as the the standard errors of the calculated parameters? for example I got a model: mod <- lm(Crd ~ 1 + Week, data=data) and its summary: > summary(mod) Call: lm(formula = Crd ~ 1 + Week, data = data, model = TRUE, y = TRUE) Residuals: Min
2006 Mar 02
1
predict.glm - how to?
Hi I have a little R problem. I have created a GLM model in R and now I want to predict some values outside the values I have in the model (extrapolate). I have this code: fitted.model4 <- glm(Yval ~ time, family=gaussian, data=Fuel) The question is - How do I predict a value of Yval ie with a value of time = 340 and also get confidence/prediction intervals for Yvar? I have tried the
2010 May 26
2
Survival analysis extrapolation
Dear all, I'm trying to fit a curve to some 1 year failure-time data, so that I can extrapolate and predict failure rates up to 3 years. The data is in the general form: Treatment Time Status Treatment A 28 0 Treatment B 28 0 Treatment B 28 0 Treatment A 28
2012 May 31
2
bigglm binomial negative fitted value
Hi, there Since glm cannot handle factors very well. I try to use bigglm like this: logit_model <- bigglm(responser~var1+var2+var3, data, chunksize=1000, family=binomial(), weights=~trial, sandwich=FALSE) fitted <- predict(logit_model, data) only var2 is factor, var1 and var3 are numeric. I expect fitted should be a vector of value falls in (0,1) However, I get something like this:
2018 Apr 21
0
Error : 'start' contains NA values when fitting frank copula
>>>>> Soumen Banerjee <soumen08 at gmail.com> >>>>> on Sat, 21 Apr 2018 17:22:56 +0800 writes: > Hello! I am trying to fit a copula to some data in R and > I get the error mentioned above. This is the code for a > reproducible example - (not really reproducible: You did not set the random seed, so the data is different every time;