search for: f_i

Displaying 20 results from an estimated 22 matches for "f_i".

Did you mean: _i
2011 Jan 25
3
Integration of two lines
Hello, I need to integrate the absolute difference between two lines measured on different points. # For example : x <- seq(0, 1, 1/100) f_x <- runif(101) + x y <- seq(0, 1, 1/23) f_y <- runif(24) + (1 - y) plot(x, f_x, type="l") lines(y, f_y) Then I would like to compute Integral( | f_x - f_y | )dx. (This is not the same as | Integral(f_x)dx - Integral(f_y)dx |.)
2008 Jun 03
3
How to solve a non-linear system of equations using R
Dear R-list members, I've had a hard time trying to solve a non-linear system (nls) of equations which structure for the equation i, i=1,...,4, is as follows: f_i(d_1,d_2,d_3,d_4)-k_i(l,m,s) = 0 (1) In the expression above, both f_i and k_i are known functions and l, m and s are known constants. I would like to estimate the vector d=(d_1,d_2,d_3,d_4) which is solution of (1). Functions in R to estimate f_i-k_i are at the end of this message. Any help/s...
2011 Feb 16
0
Constraints in projection pursuit regression
Hi, I am solving a projection pursuit regression problem, of the form y = \sum_i f_i (a_i^T x), where a_i are unknown directions, while f_i are unknown univariate link functions. The following is known about each f_i: 1. f_i (0) = 0  (that is, each f_i passes through the origin) 2. f_i is monotonic. Is there a way to ensure that the function ppr() in R produces solutions tha...
2003 Oct 23
1
Variance-covariance matrix for beta hat and b hat from lme
...t and b_i hat from the lme fitted object? The reason for needing this is because I want to have interval prediction on the predicted values (at level = 0:1). The "predict.lme" seems to provide point estimates only. The predicted value for new observation of the i_th subject, with E_i and F_i as regressor matrices for fixed- and random-effects respectively, is y_i hat = E_i * beta hat + F_i * b_i hat which can also be written as y_i hat = [ E_i, F_i ] * [ beta hat ', b_i hat' ]' , where prime denotes transpose. Therefore, the variance of y_i hat is Var(y_i hat) = [ E_i, F_...
2006 Jan 12
1
Problem with NLSYSTEMFIT()
Hello, I want to solve a nonlinear 3SLS problem with "nlsystemfit()". The equations are of the form y_it = f_i(x,t,theta) The functions f_i(.) have to be formulated as R-functions. When invoking "nlsystemfit()" I get the error Error in deriv.formula(eqns[[i]], names(parmnames)) : Function 'f1' is not in the derivatives table Isn't it possible to provide equations in...
2024 Jan 23
0
Quantiles of sums of independent discrete random variables
Greetings, I have the following? Problem: Given k (=10) discrete independent random variables X_i with n_i (= 5 to 20) values each,compute quantiles of the distribution of the sum X = X_1+...+X_k. Here X has n=n_1 x n_2 ... n_k distinct values which is too large to list them all together with their probabilities. I tried several approaches: (A) Convolution: each X_j is approximated with
2008 Jul 31
1
clustering and data-mining...
Hi all, I am doing some experiment studies... It seems to me that with different combination of 5 parameters, the end results ultimately converged to two scalars. That's to say, some combinations of the 5 parameters lead to one end result and some other combinations of the 5 parameters lead to the other end result (scalar). I am thinking of this is sort of something like clustering or
2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
List: Thank you for the replies to my post yesterday. Gabor and Phil also gave useful replies on how to improve the function by relying on mapply rather than the explicit for loop. In general, I try and use the family of apply functions rather than the looping constructs such as for, while etc as a matter of practice. However, it seems the mapply function in this case is slower (in terms of CPU
2006 Jan 14
1
Different length of objects
Hello, i got an warning message in the following code: f<-1:100 t<-1:100 b<-100 ll2 <- function(b,f,t) { t<-cumsum(t) tn<-t[length(t)] i<-seq(along=f) s1<-(tn*exp(-b*tn)*sum(f[i]))/(1-exp(-b*tn)) s2<-sum((f[i]*(t[i]*exp(-b*t[i])-t[i-1]*exp(b*t[i-1])))/(exp(-b*t[i-1])-exp(-b*t[i]))) s1-s2 } ll2(b,f,t) i think, the problem here is, that t[0] doesn't
2009 Aug 06
1
solving system of equations involving non-linearities
...ould appreciate if someone could help me on track with this problem. I want to compute some parameters from a system of equations given a number of sample observations. The system looks like this: sum_i( A+b_i>0 & A+b_i>C+d_i) = x sum_i( C+d_i>0 & C+d_i>A+b_i) = y sum_i( exp(E+f_i) * ( A+b_i>0 & A+b_i>C+d_i) = z A, C, E are free variables while the other letters represent values given from sample observations. The equations involve counts of the number of fulfilled conditions and therefore non-linearities. Furthermore, since I have many observations i, the equatio...
2004 Jul 10
1
Exact Maximum Likelihood Package
...ls. Let s and t be the Bernoulli parameters and p the mixing parameter. There are 5 possible outcomes f0 = p*(1-s)^4 + (1-p)*(1-t)^4; f1 = 4*p*s*(1-s)^3 + 4*(1-p)*t*(1-t)^3; f2 = 6*p*s^2*(1-s)^2 + 6*(1-p)*t^2*(1-t)^2; f3 = 4*p*s^3*(1-s) + 4*(1-p)*t^3*(1-t); f4 = p*s^4 + (1-p)*t^4; The polynomial f_i represents the probability of seeing i successes. Suppose we repeat this experiment 1000 times, and u_i is the number of times we saw i successes. The likelihood of this event is f_0^u_0*f_1^u_1*f_2^u_2*f_3^u_3*f_4^u_4, and we seek to find those parameter values for s,t,p which maximize the likeli...
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
Spencer Thanks for your thoughts on this. I did a bit of work and did end up with a method (more a trick), but it did work. I am certain there are better ways to do this, but here is how I resolved the issue. The integral I need to evaluate is \begin{equation} \frac{\int_c^{\infty} p(x|\theta)f(\theta)d\theta} {\int_{-\infty}^{\infty} p(x|\theta)f(\theta)d\theta} \end{equation} Where
2010 Nov 16
1
Re : interpretation of coefficients in survreg AND obtaining the hazard function for an individual given a set of predictors
...individual in the study given by h_i(t) = > exp(\beta'x_i)*\lambda*\gamma*t^{\gamma-1}, it doesn't look like to me that > predict(mwa, type='linear') is \beta'x_i. No, it's beta'x_i for the accelerated failure parametrization of the Weibull. In terms of the CDF F_i(t) = F_0( exp((t+beta'x_i)/scale) ) So you need to multiply by the scale parameter and change sign to get the log hazard ratios. > b) since I need the coefficient intercept from the model to obtain the scale > parameter to obtain the base hazard function as defined in Collett > (h_...
2005 Feb 24
0
KalmanXXXX and deJong-Penzer statistic?
...www.lse.ac.uk/collections/statistics/documents/researchreport34.pdf 'Diagnosing Shocks in TIme Series', de Jong and Penzer construct a statistic (tau) which can be used to locate potential shocks. [p15, Theorem 6.1 and below]. They also state that all the components of that statistic (v_i, F_i, r_i, N_i) 'are computed with Kalman Filter Smoother applied to the null model'. Also, as I understand, that part has been implemented in one of the S packages , SsfPack, as the book on that states on p 531 'the standardized smoothed disturbances may be interpreted as t-statistics for...
2010 Mar 16
0
How can I calculate the error of a fit parameter, when the data set has an error itself?
Hi out there, imagine you have a dataset (x,y) with errors f, so that each y_i is y_i +- f_i. This is the normal case for almost all measurements, that one quantity y can only be measured with a certain accuracy. > x<-c(1,2,3) > y<-c(1.1,0.8,1.3) > f<-c(0.2,0.2,0.2) > plot(x,y) #whereas every y has the uncertainty of f If I now perform a nls-fit (and force the...
2010 Mar 29
0
Error of a fit parameter, of the data set has errors itself?
Hi out there, imagine you have a dataset (x,y) with errors f, so that each y_i is y_i +- f_i. This is the normal case for almost all measurements, since one quantity y can only be measured with a certain accuracy f. > x<-c(1,2,3) > y<-c(1.1,0.8,1.3) > f<-c(0.2,0.2,0.2) > plot(x,y) #whereas every y has the uncertainty of f If I now perform a nls-fit (and force the dat...
2011 Jul 01
0
How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track
Dear R users, subject: How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track or subject as: How to filter XY pairs of inacurate gps position: (latitude, longtitude) to get estimated correct position before calculating track i.e. How to estimate (time series? )? How to filter XY pairs of
2011 Feb 20
8
Generating uniformly distributed correlated data.
I wish to generate a vector of uniformly distributed data with a defined correlation to another vector The only function I have been able to find doing something similar is corgen from the library ecodist. The following code generates data with the desired correlation to the vector x but the resulting vector y is normal and not uniform distributed library(ecodist) x <- runif(10^5) y
2006 Apr 20
0
Major internal changes, TI DSP build change
...???q{?F ??E?_e?^so?7???8???Z??[?W??"D ?????2wf?p??p??M?,E 64???$?K???,????k,????~?Z ??? ??rn??aP??5??r????B?J?GQ????? ? ?I?X?f?0????????????X^??u?{??`?9?&v??(??W?Jp??W?K????x???t?a???????h'Mw?j?? U_}[ ?W1*:?H??\f??"?????L??'M??)y??? ?j?m%??A(o??g_OHod?R9"?M??~@??U???.[?;{F_I?i??? ?2??.?vF???? ?=???vxwW???????????Q?w=????g ??? L?dZ? ??M???????????B???????G??x?p?A>H???7?ldh;?w??PO???ow0eTJ????_???:????{??2H?G??S????7 ??k??????!??g????t?H? ??o??v???w? >5{F??i?#???@?D"\t???q??=??C??Sr?<o?7`?p?????}i???vg?????p???f?j??L?????3???>1????mF?? Y?-??>???'?...
2010 Nov 13
2
interpretation of coefficients in survreg AND obtaining the hazard function for an individual given a set of predictors
Dear R help list, I am modeling some survival data with coxph and survreg (dist='weibull') using package survival. I have 2 problems: 1) I do not understand how to interpret the regression coefficients in the survreg output and it is not clear, for me, from ?survreg.objects how to. Here is an example of the codes that points out my problem: - data is stc1 - the factor is dichotomous