Displaying 20 results from an estimated 100 matches similar to: "Can I replace NA by 0 (if yes, how) ?"
2007 Nov 06
1
How to find the zero (only the real solution) with the package polynom ?
Hello,
I have 3 columns : a, b and a*b
I would like to find the pair (a,b) so that a*b is the minimum but not from
the points I measured but from the fit of the curve (I have more points that
the ones given below but I fit only on this part because I
know that the minimum a*b is in this interval).
I thought doing it this way :
- to fit a*b=f(a)
abfit<-lm(ab ~ poly(a,8,raw=T))
- to use the
2011 Apr 20
2
survexp with weights
Hello,
I probably have a syntax error in trying to generate an expected
survival curve from a weighted cox model, but I can't see it. I used
the help sample code to generate a weighted model, with the addition
of a "weights=albumin" argument (I only chose albumin because it had
no missing values, not because of any real relevance). Below are my
code with the resulting error
2012 Aug 11
1
unsued argument
It is a complex function, functions are quoted frequently, you may read from
bottom up
The independent variable for final fit is q
%%Rg0 is a function of L and b
Rg0sq<-function(L,b)L*b/6*(1-3/2*b/L+3/2*(b/L)^2-3/4*(b/L)^3*(1-exp(-2*L/b)))
%%alpha is a defined function
alpha<-function(x)(1+(x/3.12)^2+(x/8.67)^3)^(0.176/3)
%%w is a defined function
2023 Dec 02
1
Try reproduce glmm by hand
Dear all,
In order to be sure I understand glmm correctly, I try to reproduce by
hand a simple result. Here is a reproducible code. The questions are in
_________________
Of course I have tried to find the solution using internet but I was not
able to find a solution. I have also tried to follow glmer but it is
very complicated code!
Thanks for any help.
Marc
# Generate set of df with nb
2009 Aug 21
1
applying summary() to an object created with ols()
Hello R-list,
I am trying to calculate a ridge regression using first the *lm.ridge()*
function from the MASS package and then applying the obtained Hoerl
Kennard Baldwin (HKB) estimator as a penalty scalar to the *ols()*
function provided by Frank Harrell in his Design package.
It looks like this:
> rrk1<-lm.ridge(lnbcpc ~ lntex + lnbeerp + lnwinep + lntemp + pop,
subset(aa,
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called
directly by users. rms uses generic functions defined in other packages.
For example there is a latex method in the Hmisc package, and rms has a
latex method for objects of class "anova.rms" so there are anova.rms and
latex.anova.rms functions in rms. I use:
2013 Jan 14
1
Confidence intervel for regression line
Hi all,
For the simple linear regression, I want to find the input "x" value so
that the
lower confidnece limit is a specific number, say 0.2.
In other words, I want to find the value of x so that the lower
confidence bound crosses the horizontal line 0.2.
Is there a simple way (an R function) that can do this?
Thanks.
Hanna
[[alternative HTML version deleted]]
2006 Jun 23
1
How to use mle or similar with integrate?
Hi
I have the following formula (I hope it is clear - if no, I can try to
do better the next time)
h(x, a, b) =
integral(0 to pi/2)
(
(
integral(D/sin(alpha) to Inf)
(
(
f(x, a, b)
)
dx
)
dalpha
)
and I want to do an mle with it.
I know how to use mle() and I also know about integrate(). My problem is
to give the parameter values a and b to the
2013 Jan 14
2
One sided confidence limits for the regression line
Hi all,
I am trying to plot the one-sided confidence limits for the regression
line.
It seems it is ok to use predict function to compute the two sided
confidence
limits. Does any one know a easy way to compute the one sided confidence
limits?
Thank you very much in advance.
Hannah
[[alternative HTML version deleted]]
2008 Jun 01
2
optim error
I saw a similar question but I still don't fully understand how to implement
optim.
Can someone help me out with this?
Thanks. Keun-Hyung
> vol<-rep(c(0.03, 0.5, 2, 4, 8, 16, 32), 3)
> time<-rep(c(2,4,8),each=7)
> p.mated<-c(0.47, 0.48, 0.43, 0.43, 0.26, 0.23, "null", 0.68, 0.62, 0.64,
0.58, 0.53, 0.47,
+ 0.24, 0.8, 0.79, 0.71, 0.56, 0.74, 0.8, 0.47)
>
2004 Jun 10
1
overhaul of mle
So, I've embarked on my threatened modifications to the mle subset
of the stats4 package. Most of what I've done so far has *not* been
adding the slick formula interface, but rather making it work properly
and reasonably robustly with real mle problems -- especially ones
involving reasonably complex fixed and default parameter sets.
Some of what I've done breaks backward
2011 Aug 05
0
[Bug 14647] profile.mle can not get correct result
Thank you very much.
now, i call
mle(minuslogl=loglik, start=start, method <<- method, fixed=list())
in the mle.wrap() function, and the profile.mle() worked.
however, it created a variable named "method" in user workspace. if
there had been a variable with same name, then the value of that
variable would be destroyed.
Is there a way to avoid that happen? Thanks again.
2011 May 12
3
Survival Rate Estimates
Dear List,
Is there an automated way to use the survival package to generate survival
rate estimates and their standard errors? To be clear, *not *the
survivorship estimates (which are cumulative), but the survival *rate *
estimates...
Thank you in advance for any help.
Best,
Brian
[[alternative HTML version deleted]]
2011 May 28
2
Nested design
Dear R-users,
I have the following problem. I have performed an experiment for which I
gathered a lot of data which I now want to test. The problem is that I
cannot find an appropriate test in R (I am a starter) and someone might give
me a hand. This is what I have done:
Across three sites (Site), I have laid out five transects (Trans)...meaning
five transects in each sites. In each transect I
2010 Aug 12
3
Regression Error: Otherwise good variable causes singularity. Why?
This command
cdmoutcome<- glm(log(value)~factor(year)
> +log(gdppcpppconst)+log(gdppcpppconstAII)
> +log(co2eemisspc)+log(co2eemisspcAII)
> +log(dist)
> +fdiboth
> +odapartnertohost
> +corrupt
> +log(infraindex)
> +litrate
> +africa
>
2010 May 17
14
noob questinon: is dev in rails underwindows a good idea
Hey guys, thx for talking your time to answer this post, i much
appreciate it.
1. is dev in rails under windows a great idea.i can think of 10000
reasons, i know, bu i can;t install linux on my PC, for now at least.
the compamy that i am working for wants me to install all of the
programs i need to develop a free lancer site, like this one
http://www.bestjobs.ro/(if u look at the right upper
2012 Jun 24
0
nouveau _BIOS method
Hi to all!
I have a problem with a nvidia geforce 520mx [NVd0 generation card
(0x0d9110a1)] i have on my notebook (samsung 3 series).
In practice i'm not able to use it with bumblebee and bbswitch.
The dmesg message is:
[ 13.507435] nouveau 0000:01:00.0: power state changed by ACPI to D0
[ 13.507440] nouveau 0000:01:00.0: power state changed by ACPI to D0
[ 13.507448] nouveau
2005 Apr 07
2
about mantelhaen.test (PR#7779)
Full_Name: Chien-yu Peng
Version: 2.0.1
OS: Windows XP Professional
Submission from: (NULL) (140.109.72.181)
Dear all:
Although I don't know you, I am thankful for your help.
When I use the function mantelhaen.test for R x C x K (R, C > 2) table,
the output is not the same as SAS's. I don't know that the result consist with
one of SAS's. But it works correctly for 2
2011 Jul 29
2
'breackpoints' (package 'strucchange'): 2 blocking error messages when using for multiple regression model testing
Good morning to all,
I am encountering a blocking issue when using the function 'breackpoints'
from package 'strucchange'.
*Context:*
I use a data frame, 248 observations of 5 variables, no NA.
I compute a linear model, as y~x1+...+x4
x4 is a dummy variable (0 or 1).
I want to check this model for structural changes.
*Process & issues:*
*First, I used function Fstats.* It
2011 Dec 21
3
NEWTON ALGORITHM
Hi,
My name is Curtis and I'm a 1st year student in Biochemistry at the
University of Geneva. I need some help completing the code for my NEWTON
ALGORITHM. It is a bonus exercice to our autumn semester maths exam and we
can hand it in or not. Usually people copy and paste but I decided to sit
down and review theory and ask for help left right and center.
My problem is that I cannot get my