Displaying 20 results from an estimated 400 matches similar to: "Matrix multiplication"
2017 Jun 08
0
Matrix multiplication
Is this a question? You seem to have three possible calculations, have already implemented two of them (?) and it is unclear (to me) what you think the right answer for any of them is supposed to be.
--
Sent from my phone. Please excuse my brevity.
On June 7, 2017 8:50:55 PM PDT, Steven Yen <syen04 at gmail.com> wrote:
>I need to have all elements of a matrix multiplied by a weight
2017 Jun 08
1
Matrix multiplication
OK Thanks. Your response made me think. Here (the last line) is what I need:
set.seed(76543211)
w<-1:10; w
a<-matrix(rpois(20,2),nrow=10); a
t(w*a)%*%a
On 6/8/2017 12:09 PM, Jeff Newmiller wrote:
> Is this a question? You seem to have three possible calculations, have already implemented two of them (?) and it is unclear (to me) what you think the right answer for any of them is
2018 Jan 26
0
Problem saving .RData file with save.image
I am running R-3.0.3 on RStudio 1.1.183. I have recently gotten the following error message while saving an .RData file with the save.image command. I have not had this problem until recently. Help appreciated.
===
Error in save.image("bope1a.RData") :
image could not be renamed and is left in bope1a.RDataTmp
[[alternative HTML version deleted]]
2011 Jun 21
1
Setting up list of many equations for systemfit
Dear List Members,I am trying to set up a large system of equations and I am trying to find a simple way to set up the list command under the package system fit. Here is the example from system fit and what I am trying to do:
EQ1 <- Y1 ~ X1 + X2 + X4EQ2 <- Y2 ~ X2 + X3EQ3 <- Y3 ~ X2 + X3 + X4EQ4 <- Y4 ~ X1 + X3 + X4eqSystem <-list(form1 = EQ1, form2 = EQ2, form3 = EQ3, form4 = EQ4)
2009 Apr 13
2
joint estimation of two poisson equations
Dear list members,
Is there a package somewhere for jointly estimating two poisson processes?
I think the closest I've come is using the "SUR" option in the Zelig
package (see below), but when I try the "poisson" option instead of
the "SUR" optioin I get an error (error given below, and indeed,
reading the documentation of the Zelig package, I get the impression
2012 Oct 17
1
extracting and restricting coefficients
HiĀ
I want to fit two equations simultaneously
EQ1<-Y1~X1+X2
EQ2<-Y2~X1+X2
eqsystem<-list(Y1HAT=EQ1,Y2HAT=EQ2)
fitols<-systemfit(eqsystem,
method="OLS", data=BB)
How do I get coefficients for the first equation? R code
How do I restrict coefficient of X2 in the first equation (say , restrict it to less thanĀ zero). R code
Your help is
appreciated.
Dereje
[[alternative
2017 Jun 11
1
Memory leak in nleqslv()
Hello all,
I am relatively new to R, but enjoying it very much. I am hoping that
someone on this list can help me with an issue I am having.
I am having issues with iterations over nleqslv, in that the solver
does not appear to clean up memory used in previous iterations. I
believe I've isolated the/my issue in a small sample of code:
library(nleqslv)
cons_ext_test <- function(x){
2011 Jun 28
2
How do I output all the R-squares of an SUR? summary(fitSUR$eq[[1:4]])$r.squared does not work
Greetings R Users,
I have a system of equations for which I would like to output all the
R-squares. Assume there are four equations in my system, the only way I
found to output all the R-squares is by calling them out one by one as this:
summary(fitSUR$eq[[1]])$r.squared
summary(fitSUR$eq[[2]])$r.squared
summary(fitSUR$eq[[3]])$r.squared
summary(fitSUR$eq[[4]])$r.squared
But isn't there a
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
2011 Jun 23
0
Loops, Paste, Apply? What is the best way to set up a list of many equations?
Is there a way to apply paste to?list(form1 = EQ1, form2 = EQ2, form3 = EQ3, form4 = EQ4)?such that I don't have to write form1=EQ1 for all my models?(I might have a list of 20 or more)? I also need the EQs to read the formulas associated with them.
For example, below, I was able to automate the name assignment but I could not figure out how to?to set up the list using?paste or other
2004 Nov 29
3
systemfit - SUR
Hello to everyone,
I have 2 problems and would be very pleased if anyone can help me:
1) When I use the package "systemfit" for SUR regressions, I get two
different variance-covariance matrices when I firstly do the SUR
regression ("The covariance matrix of the residuals used for
estimation") and secondly do the OLS regressions. In the manual for
"systemfit" on page
2007 Mar 28
0
nlsystemfit: Errors with reproducing the manual example
Hi everybody, I'm a newbye with lots of problems :). I'm trying to use
nlsystemfit, but I recieve two error messages whose origin that I don't
understand.
1) When I try to reproduce the example reported in the systemfit package
manual, that is
library( systemfit )
data( ppine )
hg.formula <- hg ~ exp( h0 + h1*log(tht) + h2*tht^2 + h3*elev + h4*cr)
dg.formula <- dg ~ exp( d0
2014 Oct 19
2
Checking if a matrix exists/is defined
Hello
Can someone help me with the following, specifically in judging
whether a matrix exists. I have trouble with the first line below. In
this case, matrix obj$hessian exists and is 74 x 74. I receive the
error message:
Warning message:
In all(w$hessian) : coercing argument of type 'double' to logical
Thank you all.
---
if (!all(obj$hessian)|OPG){
vb<-obj$gradientObs;
2008 Oct 06
0
Computationally singular [provides coefficients but not covariance matrix]
Hi,
I am estimating a regression but the summary command is unable to provide me
results, while the coefficients are available from the coefficients value. I
suppose that it cannot estimate the covariance matrix. Is there any command
that I can relax the tolerance so it can estimate the covariance matrix.
The code and the error of R is:
eq1<-rq(y~factor(year)+factor(state)+x1+x2+x3,
2011 Oct 02
0
deSolve - Function daspk on DAE system - Error
I'm getting this error on the attached code and breaking my head but can't
figure it out. Any help is much appreciated. Thanks, Vince
CODE:
library(deSolve)
Res_DAE=function(t, y, dy, pars) {
with(as.list(c(y, dy, pars)), {
res1 = -dS -dES-k2*ES
res2 = -dP + k2*ES
eq1 = Eo-E -ES
eq2 = So-S -ES -P
return(list(c(res1, res2, eq1, eq2)))
})
}
pars <- c(Eo=0.02,
2011 Oct 03
0
deSolve - Function daspk on DAE system - Error (Vince)
Vince,
When that happens, one possible reason is that your DAE is of index > 1,
which cannot be solved by daspk.
The solver radau, also from deSolve can handle DAEs up to index 3, but
you need to rewrite the problem in the form M*y' = f(x,y), where M is a
mass matrix.
If you do that for your problem, and solve it with radau, then radau
complains that the "matrix is repeatedly
2024 Oct 04
1
apply
Even if this is not a homework question, it smells like one. If you read the Posting Guide it warns you that homework is off-topic, so when you impose an arbitrary constraint like "must use specific unrelated function" we feel like you are either cheating or wasting our time, and it is up to you to explain why we should follow you down this rabbit hole, keeping in mind that statistics
2024 Oct 04
1
apply
Pardon me!!!
What makes you think this is a homework question? You are not obligated
to respond if the question is not intelligent enough for you.
I did the following: two ways to calculate a covariance matrix but
wonder how I might replicate the results with "apply". I am not too
comfortable with the online do of apply.
> set.seed(122345671) > n<-3 > x<-rnorm(n); x
2002 Jul 31
0
Nonlinear Seemingly Unrelated Regression
Hello to everyone,
I found some problems using R in the estimation of systems of nonlinear
equations
like SURE (Seemingly Unrelated Regression Equations) with mutual
parameters as the following system example:
EQ1 PQ1=P1*G1+B1*(Y-P1*G1-P2*G2-P3*G3)
EQ2 PQ2=P2*G2+B2*(Y-P1*G1-P2*G2-P3*G3)
where G1,G2,G3,B1,B2 are the coefficients to estimate.
command "nls" accept only single
2002 Aug 13
0
Non linear SUR estimation
TO: r-help at lists.R-project.org
r-help at stat.math.ethz.ch
Hello to everyone,
I found some problems using R in the estimation of systems of nonlinear
equations
like SURE (Seemingly Unrelated Regression Equations) with mutual
parameters as the following system example:
EQ1 PQ1=P1*G1+B1*(Y-P1*G1-P2*G2-P3*G3)
EQ2 PQ2=P2*G2+B2*(Y-P1*G1-P2*G2-P3*G3)
where G1,G2,G3,B1,B2 are the