Displaying 18 results from an estimated 18 matches for "coef2".
Did you mean:
coef
2010 Dec 14
2
multivariate multi regression
Hello,
I want to model my data with the following model:
Y1=X1*coef1+X2*coef2
Y2=X1*coef2+X2*coef3
Note: coef2 appears in both lines
Xi, Yi is input versus output data respectively
How can I do this in R?
I got this far:
lm(Y1~X1+X2,mydata)
now how do I add the second line of the model including the cross
dependency?
Your help is greatly appreciated!
Cheers...
2009 May 19
4
nlrwr package. Error when fitting the optimal Box-Cox transformation with two variables
Dear all:
I'm trying to fit the optimal Box-Cox
transformation related to nls (see the code
below) for the demand of money data in Green (3th
Edition) but in the last step R gives the next
error message.
Error en
`[.data.frame`(eval(object$data), ,
as.character(formula(object)[[2]])[2]) :
undefined columns selected.
?Any idea to solve the problem?
Thanks in advance,
2008 Dec 23
1
newbie problem using Design.rcs
.....,1000) for x (the predictor) with some noise (x+.02*x) and I set the response variable y=x. Then, I try rcs and ols as follows:
m = ( sqrt(y1) ~ ( rcs(x1,3) ) ); #I tried without sqrt also
f = ols(m, data=data_train.df);
print(f);
[I plot original x1,y1 vectors and the regression as in
y <- coef2[1] + coef2[2]*x1 + coef2[3]*x1*x1]
But this gives me a VERY bad fit:
"
Linear Regression Model
ols(formula = m, data = data_train.df)
n Model L.R. d.f. R2 Sigma
1000 4573 2 0.9897 0.76
Residuals:
Min 1Q Median...
2015 Dec 20
2
[Aarch64 v2 05/18] Add Neon intrinsics for Silk noise shape quantization.
Jonathan Lennox wrote:
> +opus_int32 silk_noise_shape_quantizer_short_prediction_neon(const opus_int32 *buf32, const opus_int32 *coef32)
> +{
> + int32x4_t coef0 = vld1q_s32(coef32);
> + int32x4_t coef1 = vld1q_s32(coef32 + 4);
> + int32x4_t coef2 = vld1q_s32(coef32 + 8);
> + int32x4_t coef3 = vld1q_s32(coef32 + 12);
> +
> + int32x4_t a0 = vld1q_s32(buf32 - 15);
> + int32x4_t a1 = vld1q_s32(buf32 - 11);
> + int32x4_t a2 = vld1q_s32(buf32 - 7);
> + int32x4_t a3 = vld1q_s32(buf32 - 3);
> +
> + int64x2_...
2003 Jul 30
2
Comparing two regression slopes
...ion seems to be extremely sensitive both of these. I am
wondering if I've missed something in my function? I'd be very grateful for
any tips.
Thanks!
Martin
TwoSlope <-function(lm1, lm2) {
## lm1 and lm2 are two linear models on independent data sets
coef1 <-summary(lm1)$coef
coef2 <-summary(lm2)$coef
sigma <-(sum(lm1$residuals^2)+sum(lm2$residuals^2))/(lm1$df.residual +
lm2$df.residual-4)
SSall <-sum(lm1$model[,2]^2) + sum(lm2$model[,2]^2)
SSprod <-sum(lm1$model[,2]^2) * sum(lm2$model[,2]^2)
F.val <-(as.numeric(coefficients(lm1)[2]) - as.numeric(coefficient...
2015 Dec 21
0
[Aarch64 v2 05/18] Add Neon intrinsics for Silk noise shape quantization.
...e:
>
> Jonathan Lennox wrote:
>> +opus_int32 silk_noise_shape_quantizer_short_prediction_neon(const opus_int32 *buf32, const opus_int32 *coef32)
>> +{
>> + int32x4_t coef0 = vld1q_s32(coef32);
>> + int32x4_t coef1 = vld1q_s32(coef32 + 4);
>> + int32x4_t coef2 = vld1q_s32(coef32 + 8);
>> + int32x4_t coef3 = vld1q_s32(coef32 + 12);
>> +
>> + int32x4_t a0 = vld1q_s32(buf32 - 15);
>> + int32x4_t a1 = vld1q_s32(buf32 - 11);
>> + int32x4_t a2 = vld1q_s32(buf32 - 7);
>> + int32x4_t a3 = vld1q_s32(buf32 - 3);
&...
2005 Aug 24
1
lm.ridge
Hello, I have posted this mail a few days ago but I did it wrong, I hope
is right now:
I have the following doubts related with lm.ridge, from MASS package. To
show the problem using the Longley example, I have the following doubts:
First: I think coefficients from lm(Employed~.,data=longley) should be
equal coefficients from lm.ridge(Employed~.,data=longley, lambda=0) why
it does not happen?
2002 Aug 20
0
Re: SVM questions
...))
## compute raw prediction for classifier (i,j)
predone <- function (i,j) {
## ranges for class i and j:
ri <- start[i] : (start[i] + object$nSV[i] - 1)
rj <- start[j] : (start[j] + object$nSV[j] - 1)
## coefs for (i,j):
coef1 <- object$coefs[ri, j-1]
coef2 <- object$coefs[rj, i]
## return raw values:
crossprod(coef1, kernel[ri]) + crossprod(coef2, kernel[rj])
}
## compute votes for all classifiers
votes <- rep(0,object$nclasses)
c <- 0 # rho counter
for (i in 1 : (object$nclasses - 1))
for (j in (i + 1) : object$nclas...
2015 Aug 05
0
[PATCH 6/8] Add Neon intrinsics for Silk noise shape quantization.
...#include "celt/cpu_support.h"
+#include "celt/arm/armcpu.h"
+
+opus_int32 silk_noise_shape_quantizer_short_prediction_neon(const opus_int32 *buf32, const opus_int32 *coef32)
+{
+ int32x4_t coef0 = vld1q_s32(coef32);
+ int32x4_t coef1 = vld1q_s32(coef32 + 4);
+ int32x4_t coef2 = vld1q_s32(coef32 + 8);
+ int32x4_t coef3 = vld1q_s32(coef32 + 12);
+
+ int32x4_t a0 = vld1q_s32(buf32 - 15);
+ int32x4_t a1 = vld1q_s32(buf32 - 11);
+ int32x4_t a2 = vld1q_s32(buf32 - 7);
+ int32x4_t a3 = vld1q_s32(buf32 - 3);
+
+ int64x2_t b0 = vmull_s32(vget_low_s32(a0), vget_...
2015 Nov 21
0
[Aarch64 v2 05/18] Add Neon intrinsics for Silk noise shape quantization.
...#include "celt/cpu_support.h"
+#include "celt/arm/armcpu.h"
+
+opus_int32 silk_noise_shape_quantizer_short_prediction_neon(const opus_int32 *buf32, const opus_int32 *coef32)
+{
+ int32x4_t coef0 = vld1q_s32(coef32);
+ int32x4_t coef1 = vld1q_s32(coef32 + 4);
+ int32x4_t coef2 = vld1q_s32(coef32 + 8);
+ int32x4_t coef3 = vld1q_s32(coef32 + 12);
+
+ int32x4_t a0 = vld1q_s32(buf32 - 15);
+ int32x4_t a1 = vld1q_s32(buf32 - 11);
+ int32x4_t a2 = vld1q_s32(buf32 - 7);
+ int32x4_t a3 = vld1q_s32(buf32 - 3);
+
+ int64x2_t b0 = vmull_s32(vget_low_s32(a0), vget_...
2015 Nov 21
12
[Aarch64 v2 00/18] Patches to enable Aarch64 (version 2)
As promised, here's a re-send of all my Aarch64 patches, following
comments by John Ridges.
Note that they actually affect more than just Aarch64 -- other than
the ones specifically guarded by AARCH64_NEON defines, the Neon
intrinsics all also apply on armv7; and the OPUS_FAST_INT64 patches
apply on any 64-bit machine.
The patches should largely be independent and independently useful,
other
2012 Jan 26
2
R extracting regression coefficients from multiple regressions using lapply command
Hi, I have a question about running multiple in regressions in R and then
storing the coefficients. I have a large dataset with several variables,
one of which is a state variable, coded 1-50 for each state. I'd like to
run a regression of 28 select variables on the remaining 27 variables of
the dataset (there are 55 variables total), and specific for each state, ie
run a regression of
2007 Dec 31
3
Survival analysis with no events in one treatment group
I'm trying to fit a Cox proportional hazards model to some hospital
admission data. About 25% of the patients have had at least one
admission, and of these, 40% have had two admissions within the 12
month period of the study. Each patients has had one of 4
treatments, and one of the treatment groups has had no admissions for
the period. I used:
2015 Aug 05
8
[PATCH 0/8] Patches for arm64 (aarch64) support
This sequence of patches provides arm64 support for Opus. Tested on
iOS, Android, and Ubuntu 14.04.
The patch sequence was written on top of Viswanath Puttagunta's Ne10
patches, but all but the second ("Reorganize pitch_arm.h") should, I
think, apply independently of it. It does depends on my previous
intrinsics configury reorganization, however.
Comments welcome.
With this and
2015 Nov 07
12
[Aarch64 00/11] Patches to enable Aarch64 (arm64) optimizations, rebased to current master.
Here are my aarch64 patches rebased to the current tip of Opus master.
They're largely the same as my previous patch set, with the addition
of the final one (the Neon fixed-point implementation of
xcorr_kernel). This replaces Viswanath's Neon fixed-point
celt_pitch_xcorr, since xcorr_kernel is used in celt_fir and celt_iir
as well.
These have been tested for correctness under qemu
2015 Dec 23
6
[AArch64 neon intrinsics v4 0/5] Rework Neon intrinsic code for Aarch64 patchset
Following Tim's comments, here are my reworked patches for the Neon intrinsic function patches of
of my Aarch64 patchset, i.e. replacing patches 5-8 of the v2 series. Patches 1-4 and 9-18 of the
old series still apply unmodified.
The one new (as opposed to changed) patch is the first one in this series, to add named constants
for the ARM architecture variants.
There are also some minor code
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)
2008 Dec 29
0
Serial Correlation Test for Short Time Series
......,1000) for x
(the predictor) with some noise (x+.02*x) and I set the response variable
y=x. Then, I try rcs and ols as follows:
m = ( sqrt(y1) ~ ( rcs(x1,3) ) ); #I tried without sqrt also
f = ols(m, data=data_train.df);
print(f);
[I plot original x1,y1 vectors and the regression as in
y <- coef2[1] + coef2[2]*x1 + coef2[3]*x1*x1]
But this gives me a VERY bad fit:
"
Linear Regression Model
ols(formula = m, data = data_train.df)
n Model L.R. d.f. R2 Sigma
1000 4573 2 0.9897 0.76
Residuals:
Min 1Q Median...