Displaying 20 results from an estimated 1000 matches similar to: "mgcv: How to calculate a confidence interval of a ratio"
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)??
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
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).
2010 Jan 26
3
Problem with "nls" function
Dear R users,
I have a response variable in a csv file called "y" and a matrix of
predictor variables in a csv file called "mat". I have used the function
"nls" I have specified the nonlinear relation between these variable.The
code I have witten is called Rprog which begins with the phrase:
L.minor.m1<-nls(Y~a ....etc..
The program when I execute the program, I
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.
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
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.
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"
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
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
2006 May 10
4
lattice package plots
I am using the lattice packge for its levelplot and contourplot. Is it
possible to adjust the line thickness of the 'box' and tickmarks in these
plots?
Thanks for the attention,
Matt Sundling
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
2003 Nov 10
1
ts package function filter: mismatch between function action and help (PR#5017)
Dear people,
I'm running
RedHat 9.0
and
R : Version 1.7.1 (2003-06-16)
from the help file
# Usage:
#
# filter(x, filter, method = c("convolution", "recursive"),
# sides = 2, circular = FALSE, init)
# init: for recursive filters only. Specifies the initial values of
# the time series just prior to the start value, in reverse
# time
2008 Apr 09
1
mgcv::predict.gam lpmatrix for prediction outside of R
This is in regards to the suggested use of type="lpmatrix" in the
documentation for mgcv::predict.gam. Could one not get the same result more
simply by using type="terms" and interpolating each term directly? What is
the advantage of the lpmatrix approach for prediction outside R? Thanks.
--
View this message in context:
2005 Sep 15
1
Coefficients from LM
Hi everyone,
Can anyone tell me if its possibility to extract the coefficients from the
lm() command?
For instance, imagine that we have the following data set (the number of
observations for each company is actually larger than the one showed...):
Company Y X1 X2
1 y_1 x1_1 x2_1
1 y_2 x1_2 x2_2
1 y_3 x1_3 x2_3
(...)
2 y_4 x1_4 x2_4
2 y_5 x1_5 x2_5
2 y_6 x1_6 x2_6
(...)
n y_n x1_n x2_n
n
2008 Nov 03
2
Calculating R2 for a unit slope regression
Does anyone know of a literature reference, or a piece of code that can help me calculate the amount of variation explained (R2 value), in a regression constrained to have a slope of 1 and an intercept of 0?
Thanks!
Sebastian
J. Sebastián Tello
Department of Biological Sciences
285 Life Sciences Building
Louisiana State University
Baton Rouge, LA, 70803
(225) 578-4284 (office and lab.)
2008 Dec 12
1
Concordance Index - interpretation
Hello everyone.
This is a question regarding generation of the concordance index (c
index) in R using the function rcorr.cens. In particular about
interpretation of its direction and form of the 'predictor'.
One of the arguments is a "numeric predictor variable" ( presumably
this is just a *single* predictor variable). Say this variable takes
numeric values.... Am I
2012 May 09
4
Can't read xlsx file into R. Seem, Seem to have XLConnect loaded.
I have spent hours on R in Windows 7. Just installed 2 days ago so the R
package should be current.
Currently I am using the RGui (64-bit) for Windows.
I can not read an Excel file into R from my computer. Have hours on this.
Completely crazy!!
I have the XLConnect package loaded. I think it is loaded because when I
enter:
> loadedNamespaces()
[1] "base"
2010 Sep 26
1
Basis functions of cubic regression spline in mgcv
I have a question about the basis functions of cubic regression spline in
mgcv. Are there some ways I can get the exact forms of the basis functions
and the penalty matrix that are used in mgcv? Thanks in advance!
Yan
[[alternative HTML version deleted]]
2005 Feb 27
1
prediction, gam, mgcv
I fitted a GAM model with Poisson distribution
using the function gam() in the mgcv package.
My model is of the form:
mod<-gam(y~s(x0)+s(x1)+s(x2),family=poisson).
To extract estimates at a specified set of covariate
values I used the gam `predict' method.
But I want to get
estimate and standard error of the difference of two fitted values.
Can someone explain what should I do?
Thank