Displaying 3 results from an estimated 3 matches for "y_fit".
Did you mean:
my_fit
2011 Feb 11
2
fitdistr question
...t as lambda. I'm a bit confused because I was
expecting an optimization of this parameter to gain a good fit...
If I would use mle() of stats4 package or mle2() of bbmle package, I
would have to write the function by myself which should be optimized.
But what shall I return?
-sum((y_observed - y_fitted)^2)
?
Any other suggestions or comments on my solution?
Antje
2011 Aug 25
1
Autocorrelation using acf
...per following.
y = c(15.91,9.80,17.16,16.68,15.53,22.66,31.01,8.62,45.82,10.97,45.46,28.69,36.75,37.75, 41.18,42.67,46.05, 43.70,53.08,47.56)
t = c(1:20) # defining time variable.
Fitting y = a + bt + e, I get the estimates of a and b as a = 9.12 and b = 2.07. So using these estimates I obtain
y_fit = c(11.19,13.26,15.33,17.40,19.47,21.54,23.61,25.68,27.75,29.82,31.89,33.96, 36.03,38.10, 40.17,42.24,44.31,46.38,48.45,50.52) # these are fitted values.
e_t = (y - y_fit) # dif between the observed y and fitted value of corresponding y
> e_t
[1] 4.72 -3.46 1.83 -0.72 -3.94 1.12 ...
2008 May 11
0
loess and locpoly
Dear list,
I've got a question concerning difference between loess and locpoly. I have to use a plug-in method to chose a bandwith so I take locpoly method to fit a curve.
My problem is:I know how to get predicted values in loess:
m=loess(y~x)
y_fitted=predict(m).
But how to get the same in locpoly? I computed like this:
bw=dpill(x, y, blockmax = 5, divisor = 20,trim = 0.01, proptrun = 0.05,
gridsize = n, range(x), truncate = FALSE)
m=locpoly(x, y, drv = 0, degree = 1, gridsize= n, bandwidth=bw, bwdisc = 25,...