Displaying 20 results from an estimated 800 matches similar to: "horizontal direct product"

2018 May 24

0

Manipulation of data.frame into an array

This is one of those instances where a less superficial knowledge of R's
technical details comes in really handy.
What you need to do is convert the data frame to a single (numeric) vector
for, e.g. a matrix() call. This can be easily done by noting that a data
frame is also a list and using do.call():
## imp is the data frame:
do.call(c,imp)
X11 X12 X13 X14 X15 X16 X17 X18 X19

2000 Aug 14

5

Writing a workable function

After searching in R- Introduction, FAQ, help... I don't understand
this:
I write a function in a file (.R):
tt <- function(mc) { date()
mc<-read.csv2("machines.txt",na.strings="")
date()
}
I source it in R and I type tt(). The answer is
> tt()
[1] "Mon Aug 14 11:18:25 2000"
>
The instructions following the first "date()" are ignored. Why?

2018 May 24

2

Manipulation of data.frame into an array

Hello everyone,
Thank you for this. Nonetheless it is not exactly want i need.
I need mydata[[1]] to provide the values for all 3 variables (Y, X1 and X2) of the first imputation only. As it stands it returns the whole database.
Any ideas?
Best,
ioanna
________________________________
From: Bert Gunter <bgunter.4567 at gmail.com>
Sent: 24 May 2018 16:04
To: Ioanna Ioannou
Cc:

2018 May 24

4

Manipulation of data.frame into an array

Hello everyone,
I want to transform a data.frame into an array (lets call it mydata), where: mydata[[1]] is the first imputed dataset...and for each mydata[[d]], the first p columns are covariates X, and the last one is the outcome Y.
Lets assume a simple data.frame:
Imputed = data.frame( X1 = c(1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2),
X2 =

2008 Feb 02

1

ARCH LM test for univariant time series

Hi,
Does anyone know if R has a Lagrange multiplier (LM) test for ARCH
effects for univariant time series?
Thanks!
--
Tom
[[alternative HTML version deleted]]

2010 Jan 03

1

Interpreting coefficient in selection and outcome Heckman models in sampleSelection

Hi there
Within sampleSelection, I'm trying to calculate the marginal effects for
variables that are present in both the selection and outcome models.
For example, age might have a positive effect on probability of selection,
but then a negative effect on the outcome variable. i.e.
Model<-selection(participation~age, frequency~age, ...)
Documentation elsewhere describes one method for

2008 Sep 27

3

Double integration - Gauss Quadrature

Hi,
I would like to solve a double integral of the form
\int_0^1 \int_0^1 x*y dx dy
using Gauss Quadrature.
I know that I can use R's integrate function to calculate it:
integrate(function(y) {
sapply(y, function(y) {
integrate(function(x) x*y, 0, 1)$value
})
}, 0, 1)
but I would like to use Gauss Quadrature to do it.
I have written the following code (using R's statmod package)

2007 Mar 21

2

Gaussian Adaptive Quadrature

Hi all,
Does anybody know any function that performs gaussian adapative quadrature integration of univariate functions?
Thanks in advance,
Regards,
Caio
__________________________________________________
[[alternative HTML version deleted]]

2007 Apr 17

3

Extracting approximate Wald test (Chisq) from coxph(..frailty)

Dear List,
How do I extract the approximate Wald test for the
frailty (in the following example 17.89 value)?
What about the P-values, other Chisq, DF, se(coef) and
se2? How can they be extracted?
######################################################>
kfitm1
Call:
coxph(formula = Surv(time, status) ~ age + sex +
disease + frailty(id,
dist = "gauss"), data = kidney)

2006 Jul 20

2

function names in a vector used by for (){} character problem ?

Hi there,
i´m have vector of kernels. just like:
kernels = c('gauss','epan','rectangular')
i know there are density.default$kernels, but thats not my question
here. my own kernel functions are running and working.
my problem is the following is not working:
dev.off()
par(mfrow=c(3,3))
for(i in 1:length(bw))
{
for(j in 1:length(kernels))
{

2003 Sep 17

2

Date on x-axis of xyplot

xyplot doesn't seem to want to label my x-axis with dates but instead puts
the day-number for each date.
begdate is the number of days since January 1, 1960 and was initially
created by
library(date)
...
polls$begdate<-mdy.date(begmm,begdd,begyy)
I create a new dataframe (pollstack) which includes begdate. In the process
begdate seems to lose its date attribute so I redo it as:
>

2010 Apr 14

2

Gaussian Quadrature Numerical Integration In R

Hi All,
I am trying to use A Gaussian quadrature over the interval (-infty,infty) with weighting function W(x)=exp(-(x-mu)^2/sigma) to estimate an integral.
Is there a way to do it in R? Is there a function already implemented which uses such weighting function.
I have been searching in the statmode package and I found the function "gauss.quad(100, kind="hermite")" which

2013 Nov 06

3

Nonnormal Residuals and GAMs

Greetings, My question is more algorithmic than prectical. What I am
trying to determine is, are the GAM algorithms used in the mgcv package
affected by nonnormally-distributed residuals?
As I understand the theory of linear models the Gauss-Markov theorem
guarantees that least-squares regression is optimal over all unbiased
estimators iff the data meet the conditions linearity,

2017 Jul 13

2

Question on Simultaneous Equations & Forecasting

Frances,
I would not advise Gauss-Seidel for non linear models. Can be quite tricky, slow and diverge.
You can write your model as a non linear system of equations and use one of the nonlinear solvers.
See the section "Root Finding" in the task view NumericalMathematics suggesting three packages (BB, nleqslv and ktsolve). These package are certainly able to handle medium sized models.

2017 Jul 12

2

Question on Simultaneous Equations & Forecasting

Hello,
I have estimated a simultaneous equation model (similar to Klein's model) in R using the system.fit package.
I have an identity equation, along with three other equations. Do you know how to explicitly identify the identity equation in R?
I am also trying to forecast the dependent variables in the simultaneous equation model, while incorporating the identity equation in the

1997 Nov 05

3

R-beta: Latex and R

Hello R users,
This question might be already discussed before, I apologize
if it is the case.
Simple... how can I do to include a figure in a latex document.
As I have already done in Splus, I tried this:
\begin{figure}
\special{psfile=gauss.ps .......}
\end{figure}
but it didn't work. Any help?
Thank you in advance.
PS: I let down the Mac and the MS Window platforms and I am back
to my

2007 Feb 21

1

Confindence interval for Levenberg-Marquardt fit

Dear all,
I would like to use the Levenberg-Marquardt algorithm for non-linear
least-squares regression using function nls.lm. Can anybody help me to
find a a way to compute confidence intervals on the fitted
parameters as it is possible for nls (using confint.nls, which does not
work for nls.lm)?
Thank you for your help
Michael

2009 Sep 02

4

[LLVMdev] link-error: different visibilities

When I use llvm-2.5 to compile gnash which is a GNU flash movie player, some
errors appeared as follow:
llvm-ld: error: Cannot link in module
'../libcore/.libs/libgnashcore.a(movie_root.o)': Linking globals named
'_ZNKSt6vectorIN5gnash8geometry7Range2dIfEESaIS3_EE4sizeEv': symbols have
different visibilities!
Because the name is mangled, I can't find the exact

2017 Jul 13

0

Question on Simultaneous Equations & Forecasting

Hi Frances,
I have not touched the system.fit package for quite some time, but to solve your problem the following two pointers might be helpful:
1) Recast your model in the revised form, i.e., include your identity directly into your reaction functions, if possible.
2) For solving your model, you can employ the Gau?-Seidel method (see

2011 Nov 10

2

performance of adaptIntegrate vs. integrate

Dear list,
[cross-posting from Stack Overflow where this question has remained
unanswered for two weeks]
I'd like to perform a numerical integration in one dimension,
I = int_a^b f(x) dx
where the integrand f: x in IR -> f(x) in IR^p is vector-valued.
integrate() only allows scalar integrands, thus I would need to call
it many (p=200 typically) times, which sounds suboptimal. The