Displaying 20 results from an estimated 31 matches for "y_1".
Did you mean:
y1
2017 Dec 11
1
OT -- isotonic regression subject to bound constraints.
Well, I could argue that it's not *completely* OT since my question is
motivated by an enquiry that I received in respect of a CRAN package
"Iso" that I wrote and maintain.
The question is this: Given observations y_1, ..., y_n, what is the
solution to the problem:
minimise \sum_{i=1}^n (y_i - y_i^*)^2
with respect to y_1^*, ..., y_n^* subject to the "isotonic" constraint
y_1^* <= y_2^* <= ... <= y_n^* and the *additional8 bound constraint
a <= y_1^* and y_n^* <= b, where a and b a...
2008 Aug 04
2
Multivariate Regression with Weights
Hi all,
I'd like to fit a multivariate regression with the variance of the error term porportional to the predictors, like the WLS in the univariate case.
y_1~x_1+x_2
y_2~x_1+x_2
var(y_1)=x_1*sigma_1^2
var(y_2)=x_2*sigma_2^2
cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2
How can I specify this in R? Is there a corresponding function to the univariate specification lm(y~x,weights=x)?? Thanks.
Sincerely,
Yanwei Zhang
Department of Actuarial Research and...
2014 Aug 21
2
[LLVMdev] Alias Analysis Semantics
...is is not what it looks like in LLVM.
>
> In LLVM, it looks like this:
>
> std::vector<int> A(100);
>> int* x,y;
>>
>
>>
> x_1=GEP A, 0, 0
>>
> for(int i=0; i<100; i++) {
>>
> i_2 = phi (0, i_3)
> x_2 = phi(x_1, x_3)
> y_1 = GEP A, 0, i_2
> temp = load x_2
> store y_1, temp
> temp2 = add i_2, 1
> x_3 = GEP A, 0, temp2
> i_3 = add i_2, 1
> }
>
> As you can see, every time you redefine the value of the pointer x to a
> new value, it gets a new name.
>
> alias(x_1, y_...
2010 Jan 26
3
Problem with "nls" function
...very important for my phd thesis.
Thanks in advance.
Hammadi.
-------------- next part --------------
mat<- read.csv(file="mat.csv",head=FALSE,sep=";")
y<-read.csv(file="y.csv",head=FALSE,sep=";")
Y=y[,1]
D_1=mat[,1]
D_2=mat[,2]
D_3=mat[,3]
D_4=mat[,4]
Y_1=mat[,5]
Y_2=mat[,6]
Y_3=mat[,7]
Y_4=mat[,8]
s_F=mat[,9]
s_G=mat[,10]
L.minor=data.frame(Y=Y,D_1=D_1,D_2=D_2,D_3=D_3,D_4=D_4,Y_1=Y_1,Y_2=Y_2,Y_3=Y_3,Y_4=Y_4,s_F=s_F,s_G=s_G)
stdS=1/(sd(s_F))
stdG=1/(sd(s_G))
L.minor.m1<-nls(Y~a_1_1*D_1+a_2_1*D_2+a_3_1*D_3+a_4_1*D_4+a_1_2*(exp(-gamma_1_F*stdS*(s_F...
2009 Oct 01
1
Help for 3D Plotting Data on 'Irregular' Grid
Dear All,
Here is what I am trying to achieve: I would like to plot some data in 3D.
Usually, one has a matrix of the kind
y_1(x_1) , y_1(x_2).....y_1(x_i)
y_2(x_1) , y_2(x_2).....y_2(x_i)
...........................................
y_n(x_1) , y_n(x_2)......y_n(x_i)
where e.g. y_2(x_1) is the value of y at time 2 at point x_1 (see that
the grid in x is the same for the y values at all times).
Instead, in my case, the qu...
2006 Dec 14
3
Model formula question
Hi all,
I'm not familiar with R programming and I'm trying to reproduce a
result from a paper.
Basically, I have a dataset which I would like to model in terms of
successive increments, i.e. (y denote empirical values of y)
y_1 = y1,
y_2 = y1 + delta1,
y_3 = y1 + delta1 + delta2.
...
y_m = y1 + sum_2^m delta j
where delta_j donote successive increments in the y-values, i.e.
delta j = y_j - y_(j-1).
In order to estimate y-values, I'm assuming that delta j is
approximately equal to kj**u, such that my regression...
2014 Aug 14
2
[LLVMdev] Alias Analysis Semantics
On Thu, Aug 14, 2014 at 6:37 AM, Daniel Berlin <dberlin at dberlin.org> wrote:
> On Wed, Aug 13, 2014 at 8:35 PM, Jeremy Salwen <jeremysalwen at gmail.com> wrote:
>> Hey Daniel,
>>
>> Thanks again for the help. I'm still a bit confused about the interface to
>> the alias analysis. It seems like we are talking about different
>> interfaces.
>
2014 Aug 21
2
[LLVMdev] Alias Analysis Semantics
...ector<int> A(100);
> >
> > int* x,y;
> >
> >
> >
> >
> >
> >
> >
> >
> > x_1=GEP A, 0, 0
> >
> >
> >
> > for(int i=0; i<100; i++) {
> > i_2 = phi (0, i_3)
> > x_2 = phi(x_1, x_3)
> > y_1 = GEP A, 0, i_2
> > temp = load x_2
> > store y_1, temp
> > temp2 = add i_2, 1
> > x_3 = GEP A, 0, temp2
> > i_3 = add i_2, 1
> > }
> >
> >
> > As you can see, every time you redefine the value of the pointer x to
> > a new value, it gets...
2013 Feb 25
3
Empirical Bayes Estimator for Poisson-Gamma Parameters
Dear Sir/Madam,
I apologize for any cross-posting. I got a simple question, which I thought
the R list may help me to find an answer. Suppose we have Y_1, Y_2, ., Y_n ~
Poisson (Lambda_i) and Lambda_i ~Gamma(alpha_i, beta_i). Empirical Bayes
Estimator for hyper-parameters of the gamma distr, i.e. (alpha_t, beta_t)
are needed.
y=c(12,5,17,14)
n=4
What about a Hierarchal B ayes estimators?
Any relevant work and codes in R (or S+) is...
2005 May 18
1
dse VAR models
Hi,
Can anyone tell me how to construct a simple VAR(1) time series with two
variables using the dse package? I would like to end up with two time series
y_1t = \phi_11 y_1,t-1 + \phi_12 y_2,t-1 + e_1t
y_2t = \phi_21 y_1,t-1 + \phi_22 y_2,t-1 + e_2t
Best regards,
Sam.
2014 Feb 08
3
[PATCH 1/2] arm: Use the UAL syntax for ldr<cc>h instructions
On Fri, 7 Feb 2014, Timothy B. Terriberry wrote:
> Martin Storsjo wrote:
>> This is required in order to build using the built-in assembler
>> in clang.
>
> These patches break the gcc build (with "Error: bad instruction").
Ah, right, sorry about that.
> Documentation I've seen is contradictory on which order ({cond}{size} or
> {size}{cond}) is correct.
2008 Nov 01
2
sampling from Laplace-Normal
Hi,
I have to draw samples from an asymmetric-Laplace-Normal distribution:
f(u|y, x, beta, phi, sigma, tau) \propto exp( - sum( ( abs(lo) +
(2*tau-1)*lo )/(2*sigma) ) - 0.5/phi*u^2), where lo = (y - x*beta) and
y=(y_1, ..., y_n), x=(x_1, ..., x_n)
-- sorry for this huge formula --
A WinBUGS Gibbs sampler and the HI package arms sampler were used with the
same initial data for all parameters. I compared the mean from both the
Gibbs sample and the arms sample for several y and x. Surprisingly, both
means always di...
2014 Feb 08
0
[PATCH v2] arm: Use the UAL syntax for instructions
...edsp_process4_done
SUBS r2, r2, #1 ; j--
; Stall
SMLABB r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x,y_0)
- LDRGTH r14, [r4], #2 ; r14 = *x++
+ LDRHGT r14, [r4], #2 ; r14 = *x++
SMLABT r7, r12, r10, r7 ; sum[1] = MAC16_16(sum[1],x,y_1)
SMLABB r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x,y_2)
SMLABT r9, r12, r11, r9 ; sum[3] = MAC16_16(sum[3],x,y_3)
@@ -319,7 +319,7 @@ xcorr_kernel_edsp_process4_done
SMLABB r7, r14, r11, r7 ; sum[1] = MAC16_16(sum[1],x,y_2)
LDRH r10, [r5], #2 ; r1...
2014 Feb 07
3
[PATCH 1/2] arm: Use the UAL syntax for ldr<cc>h instructions
...edsp_process4_done
SUBS r2, r2, #1 ; j--
; Stall
SMLABB r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x,y_0)
- LDRGTH r14, [r4], #2 ; r14 = *x++
+ LDRHGT r14, [r4], #2 ; r14 = *x++
SMLABT r7, r12, r10, r7 ; sum[1] = MAC16_16(sum[1],x,y_1)
SMLABB r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x,y_2)
SMLABT r9, r12, r11, r9 ; sum[3] = MAC16_16(sum[3],x,y_3)
@@ -319,7 +319,7 @@ xcorr_kernel_edsp_process4_done
SMLABB r7, r14, r11, r7 ; sum[1] = MAC16_16(sum[1],x,y_2)
LDRH r10, [r5], #2 ; r1...
2012 Jan 18
3
How to define a variable in a function that another function uses without using global variables
...nction(x)
{
x+y
}
test2=function(y1)
{
y=y1
test1(2,y1)
}
Running the second function results in an error:
> test2(1)
Error in test1(2) : object 'y' not found
I see 2 possible solutions to this, but neither of them is preferred in my
more complex situation:
1. Setting y<<-y_1 globally in test2-function
2. making test1 a function of both x and y.
Is there any other way to do this except from the 2 above? I hope someone
can help me with this.
--
View this message in context: http://r.789695.n4.nabble.com/How-to-define-a-variable-in-a-function-that-another-function-uses-...
2006 Dec 14
0
Model formula
...ubject: Model formula question
To: r-help at stat.math.ethz.ch
Hi all,
I'm not familiar with R programming and I'm trying to reproduce a
result from a paper.
Basically, I have a dataset which I would like to model in terms of
successive increments, i.e. (y denote empirical values of y)
y_1 = y1,
y_2 = y1 + delta1,
y_3 = y1 + delta1 + delta2.
...
y_m = y1 + sum_2^m delta j
where delta_j donote successive increments in the y-values, i.e.
delta j = y_j - y_(j-1).
In order to estimate y-values, I'm assuming that delta j is
approximately equal to kj**u, such that my regression...
2007 Feb 02
1
multinomial logistic regression with equality constraints?
I'm interested in doing multinomial logistic regression with equality
constraints on some of the parameter values. For example, with
categorical outcomes Y_1 (baseline), Y_2, and Y_3, and covariates X_1
and X_2, I might want to impose the equality constraint that
\beta_{2,1} = \beta_{3,2}
that is, that the effect of X_1 on the logit of Y_2 is the same as the
effect of X_2 on the logit of Y_3.
Is there an existing facility or package in R for doi...
2008 Aug 13
1
The standard deviation of measurement 1 with respect to measurement 2
Hi,
I have two (different types of) measurements, say X and Y, resulting from
the same set of experiments. So X and Y are paired: (x_1, y_1), (x_2, y_2),
...
I am trying to calculate the standard deviation of Y with respect to X. In
other words, in terms of the scatter plot of X and Y, I would like to divide
it into bins along the X-axis and for each bin calculate the standard
deviation along the Y results in that bin. (Though I am no...
2011 Feb 13
1
calculate phase/amplitude of fourier transform function in R
I did a fourier transform on a function in time domain to get the following
functions in frequency domain (in latex):
$Y_1[\omega] = \frac{1}{1-\phi_1 e^{-jw}}$
$Y_2[\omega] = \frac{1}{1-(\phi_1 + \phi_2)e^{-jw} +\phi_1\phi_2e^{-2jw}}$
How do I find the spectrum of this function for given $\phi_1$ and $\phi_2$
coefficients and in the discretization interval $w = [-\pi:.1*\pi: \pi]$?
Then, how do I find the 'magni...
2003 Nov 10
1
ts package function filter: mismatch between function action and help (PR#5017)
...s only. Specifies the initial values of
# the time series just prior to the start value, in reverse
# time order. The default is a set of zeros.
but looks as if it should be in usual order as x is e.g.
init y_0 y_-1 y_-2: 3, 2, 1
filter f_1 f_2 f_3: 1, .5, .25
x: 4, 5, 6, 7, 8
y_1 = 4 + 1*3 + .5*2 + .25*1 = 8.25
y_2 = 5 + 1*8.25 + .5*3 + .25*2 = 15.25
...
but
> filter(4:8,c(1,.5,.25),method="recursive", init=3:1)
Time Series:
Start = 1
End = 5
Frequency = 1
[1] 6.7500 12.7500 22.3750 37.4375 59.8125
whereas
> filter(4:8,c(1,.5,.25),method="recursi...