Displaying 20 results from an estimated 60 matches similar to: "how to calculate the return?"
2009 Jul 20
1
Regression function lm() not giving proper results
*
*
Hi ,
Can anyone help me please with this problem?*
*
*CASE-I*
all_raw_data_NAomitted is my data frame.It has columns with names i1 ,i2,
i3,i4…, till i15.It has 291 rows actually ,couldn’t show here.
The data frame looks like this:--
i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15
2 2 2 2 2 2 2 2 2 2 2 1 2 2 3 2
3 2 2 2 2 3 2 2 3 3
2006 Nov 29
2
Dummies multiplied with other variable
Hi,
I would like to estimate something like y = a + b*d2*y + c*d3*y where
the dummies are created from some vector d with three (actually many
more) levels using factor(). But either there is included the variable
y or d1*y. How could I get rid of these?
Example:
x = c(1,2,3,4,5,6,7,8)
y = c(3,6,2,8,7,6,2,4)
d = c(1,1,1,2,3,2,3,3)
fd = factor(d)
lm(x ~ fd*y)
gives:
Coefficients:
(Intercept)
2008 Aug 20
2
arma: what is the meaning of Pr(>|t|)?
In the summary of the output of arma, there's a number Pr(>|t|), however, I
don't know what is its meaning - at least, it doesn't _seem_ to be a
Student's t distribution.
Reproducible test case:
x <- c(0.5, sin(1:9))
reg <- arma(x, c(1,0))
summary(reg)
<output>
Call:
arma(x = x, order = c(1, 0))
Model:
ARMA(1,0)
Residuals:
Min 1Q Median 3Q
2009 Aug 02
3
two-factor linear models with missing cells
I am wondering how to interpret the parameter estimates that lm()
reports in this sort of situation:
y = round(rnorm(n=24,mean=5,sd=2),2)
A = gl(3,2,24,labels=c("one","two","three"))
B = gl(4,6,24,labels=c("i","ii","iii","iv"))
# Make both observations for A=1, B=4 missing
y[19] = NA
y[20] = NA
data.frame(y,A,B)
nonadd = lm(y ~
2003 Nov 03
2
Odd r-squared
Hi,
I would consider the calculation of r-squared in the following to be a
bug, but then, I've been wrong before. It seems that R looks to see if the
model contains an intercept term, and if it does not, computes r-squared in
a way I don't understand. To my mind, the following are two alternative
parametrizations of the same model, and should yield the same r-squared.
Any insight much
2007 Jul 25
2
using contrasts on matrix regressions (using gmodels, perhaps)
Hi,
I want to test for a contrast from a regression where I am regressing the columns of a matrix. In short, the following.
X <- matrix(rnorm(50),10,5)
Y <- matrix(rnorm(50),10,5)
lm(Y~X)
Call:
lm(formula = Y ~ X)
Coefficients:
[,1] [,2] [,3] [,4] [,5]
(Intercept) 0.3350 -0.1989 -0.1932 0.7528 0.0727
X1 0.2007 -0.8505 0.0520
2011 Jun 09
1
histogram - density on y axis and restriction to interval [0, 1]
Hello,
To indicate probability densities instead of counts on a histogram, I
specify freq = FALSE.
However, I expect that summing all top y coordinates over all the
intervals of the histogram will provide 1.
1)
v <- c(0.2885, 0.2988, 0.3139, 0.2615, 0.3179, 0.3163, 0.2583, 0.3052,
0.2527, 0.3147, 0.3235, 0.2408, 0.2480, 0.3108, 0.3577, 0.2829, 0.2694,
0.3275, 0.3314, 0.2639, 0.3076,
2011 Nov 23
1
How to explain interaction variable in Linear regression?
Hello everyone,
Recently, I faced a problem on explanatory of *Interaction variable* in
Linear Regression, could anyone give me some help on how to explain that?
the response variable Y is significantly correlated with *Interaction
variable X* which is consisted of Continuous predictor A and Categorical
predictor B. The Categorical predictor B has two factors B1 (value=1) and
B2 (value=0). The
2013 Jan 08
1
GLMM post- hoc comparisons
Hi All,
I have data about seed predation (SP) in fruits of three differents colors (yellow, motted, dark) and in two fruiting seasons (2007, 2008). I performed a GLMM (lmer function, lme4 package) and the outcome showed that the interaction term (color:season) was significant, and some combinations of this interaction have significant Pr(>|z|), but I don't think they are the right
2003 Dec 05
1
Can anyone help me reproduce this SAS Mixed output??
I asked this before and I am going to try again in more applied terms. I
am trying to use R to extract variance components for a two-factor random
effects model with both factors crossed. It would also be nice to
generate some confidence intervals as well. For example, a data set
using SAS Proc Mixed is below followed by the four variance component
estimates and the respective confidence
2006 Aug 03
1
how to use the EV AND condEV from BMA's results?
Dear friends,
In R, the help of "bic.glm" tells the difference between postmean(the
posterior mean of each coefficient from model averaging) and
condpostmean(the posterior mean of each coefficient conditional on the
variable being included in the model), But it's still unclear about the
results explanations, and the artile of Rnews in 2005 on BMA still don't
give more detail on
2011 Dec 05
1
Summary coefficients give NA values because of singularities
Hello,
I have a data set which I am using to find a model with the most significant
parameters included and most importantly, the p-values. The full model is
of the form:
sad[,1]~b_1 sad[,2]+b_2 sad[,3]+b_3 sad[,4]+b_4 sad[,5]+b_5 sad[,6]+b_6
sad[,7]+b_7 sad[,8]+b_8 sad[,9]+b_9 sad[,10],
where the 9 variables on the right hand side are all indicator variables.
The thing I don't understand
2005 Jan 27
3
weighting in nls
I'm fitting nonlinear functions to some growth data but I'm getting radically different results in R to another program (Prism). Furthermore the values from the other program give a better fit and seem more realistic. I think there is a problem with the results from the r nls function. The differences only occur with weighted data so I think I'm making a mistake in the weighting.
2004 May 22
1
Inaccurate and Inconsistent results from 'round' function (PR#6905)
Full_Name: Jim Breaux
Version: 1.9.0
OS: WinXP
Submission from: (NULL) (209.78.110.135)
According to the help for 'round' it is supposed to round to the even digit.
However, see the following examples:
In the following, R is rounding down:
> round(0.3645, 3)
[1] 0.364
> round(0.3655, 3)
[1] 0.365
> round(0.3665, 3)
[1] 0.366
> round(0.3675, 3)
[1] 0.367
> round(0.3685,
2009 Jun 27
1
Regression; how to get t-values for all parameters estimates
Dear all,
Even after a couple of hours looking at old messages I still haven't found a
solution for my problem.
I'm trying to fit an additive linear regression model with 2 effects, both
fixed, to some dataset. The function contrasts(effectA) <- contr.sum can
gaurantee that the coefficients per parameter sum to one, and the function
dummy.coef provices the estimates of all
2008 Jan 27
2
[Bug 14264] New: flash ad that kills your machine
http://bugs.freedesktop.org/show_bug.cgi?id=14264
Summary: flash ad that kills your machine
Product: swfdec
Version: git
Platform: Other
OS/Version: All
Status: NEW
Severity: critical
Priority: medium
Component: library
AssignedTo: swfdec at lists.freedesktop.org
ReportedBy: riccardo at
1997 Oct 17
1
R-beta: more model.matrix
I am trying to show some techniques to my graduate regression class.
The textbook mentioned using bootstrap samples of regression
coefficients for assessing variability. I decided to show them
reasonably effective ways of doing the resampling.
The following is a function I wrote to create bootstrap samples of
coefficients from a fitted linear regression model.
bsCoefSample <-
##
2004 Apr 30
1
Exact Binomial test feature or bug?
Dear R Users,
Is the p-value reported in a two-tailed binomial exact
test in error or is it a feature?
If it is a feature, could someone provide a reference
for its two-tailed p-value computations?
Using Blaker's (2000 - Canad. J. Statist 28: 783-798)
approach,the p-value is the minimum of the two-tailed
probabilities $P \left(Y\geq y_{obs}\right)$ and
$P\left(Y\leq y_{obs}\right)$
2007 Nov 18
4
Re ad HTML table
You can use htmlTreeParse and xpathApply from the XML library.
something like:
xpathApply( htmlTreeParse("http://blabla", useInt=T), "//td", function(x)
xmlValue(x))
should do it.
Gamma wrote:
>
> anyone care to explain how to read a html table, it's streaming data
> (updated every second) and i am looking for a suitable function.
>
> The imported html
2009 Apr 27
0
VIF's in R using BIGLM
Dear R-help
This is a follow-up to my previous post here:
http://groups.google.com/group/r-help-archive/browse_thread/thread/d9b6f87ce06a9fb7/e9be30a4688f239c?lnk=gst&q=dobomode#e9be30a4688f239c
I am working on developing an open-source automated system for running
batch-regressions on very large datasets. In my previous post, I posed
the question of obtaining VIF's from the output of