Displaying 20 results from an estimated 1100 matches similar to: "calibration/inverse regression?"
2013 Mar 21
4
easy way of paste
Hello,
Is there a better way to use paste such as:
a = paste(colnames(list.indep)[1],colnames(list.indep)[2],colnames(list.indep)[3],colnames(list.indep)[4],colnames(list.indep)[5],sep="+")
> a
[1] "aa+dummy1+dummy2+bb+cc"
I tried
a = paste(colnames(list.indep)[1:5],sep="+")
> a
[1] "aa" "dummy1" "dummy2"
2008 May 22
1
How to account for autoregressive terms?
Hi,
how to estimate a the following model in R:
y(t)=beta0+beta1*x1(t)+beta2*x2(t)+...+beta5*x5(t)+beta6*y(t-1)+beta7*y(t-2)+beta8*y(t-3)
1) using "lm" :
dates <- as.Date(data.df[,1])
selection<-which(dates>=as.Date("1986-1-1") & dates<=as.Date("2007-12-31"))
dep <- ts(data.df[selection,c("dep")])
indep.ret1
2012 Sep 29
1
Unexpected behavior with weights in binomial glm()
Hi useRs,
I'm experiencing something quite weird with glm() and weights, and
maybe someone can explain what I'm doing wrong. I have a dataset
where each row represents a single case, and I run
glm(...,family="binomial") and get my coefficients. However, some of
my cases have the exact same values for predictor variables, so I
should be able to aggregate up my data frame and
2010 Nov 10
3
create a pairwise coocurrence matrix
Hi all,
I am trying to construct a pairwise coocurrence matrix for certain terms
appearing in a number of documents. For example I have the following table
with binary values showing the presence or absence of a certain term in a
document:
term1 term2 term3 term4 term5 doc1 1 1 0 0 1 doc2 1 1 0 1 1 doc3 1 0 0
0 1
And I want to have a matrix with the number of the pairwise coocurrencies.
So,
2006 Aug 24
1
Hyphenated terms
I am having a problem with any terms which contain hyphens in them. Is
there a particular reason why this wouldn''t work? i''m using aaf, and
have tried with the the previous version (pre 0.10.0) and the newest
versions of both ferret and aaf. Basically, the problem is that
term1-term2 is something my users want to search for, and it appears in
the titles of publications,
2009 Feb 03
1
How to show variables used in lm function call?
Hello R users,
I am new to R and am wondering if anyone can help me out
with the following issue: I wrote a function to build ts models using
different inputs, but when R displays the call for a model, I cannot tell
which variables
it is using because it shows the arguments instead of the real variables
passed to the function.
(e.g
Call:
lm(formula = dyn(dep ~ lag(dep, -1) + indep)) --->
2012 Jan 15
1
Need help interpreting the logit regression function
Hello R community,
I have a question about the logistic regression function.
Specifically, when the predictor variable has not just 0's and 1's,
but also fractional values (between zero and one). I get a warning
when I use the "glm(formula = ... , family = binomial(link =
"logit"))" which says:
"In eval(expr, envir, enclos) : non-integer #successes in a binomial
2010 Mar 16
3
function arguments: name of an object vs. call producing the object?
In a function, say foo.glm for glm objects I want to use the name of the
object as a label for some output,
but *only* if a glm object was passed as an argument, not a call to
glm() producing that object.
How can I distinguish these two cases?
For example, I can use the following to get the name of the argument:
foo.glm <- function(object) {
oname <- as.character(sys.call())[2]
2012 Jan 13
2
[LLVMdev] Odd weak symbol thing on i386
Hi,
I'm compiling lldiv.c from the NetBSD standard library. It works on ARM, Mips,
Microblaze,ppc, ppc64, and x86_64. On i386 a very strange thing happens.
Here's the source:
#include <stdlib.h>
#define __weak_alias(sym) __attribute__ ((weak, alias (#sym)))
lldiv_t lldiv(long long int num, long long int denom) __weak_alias(_lldiv);
lldiv_t _lldiv(long long num, long
2007 Aug 28
1
Age-Length key with kimura algorith
Se ha borrado un texto insertado con un juego de caracteres sin especificar...
Nombre: no disponible
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070828/6641b572/attachment.pl
2009 Jun 21
2
Help on qpcR package
I am using R on a Windows XP professional platform.
The following code is part of a bigger one
CODE
press=function(y,x){
library(qpcR)
models.press=numeric(0)
cat("\n")
dep=y
print(dep)
indep=log(x)
print(indep)
yfit=dep-PRESS(lm(dep~indep))[[2]]
cat("\n yfit\n")
print(yfit)
yfit.orig=yfit
presid=y-yfit.orig
press=sum(presid^2)
2006 Jul 03
1
Problem with try()
Dear R-experts,
I am running a large simulation exercise where the enough complicated integration is required.
The integral is computed within a C-function called Denom by use of function qags from the gsl library.
Here is a piece of R-code:
denom<-try(.C("Denom",as.double(x),as.integer(n), as.integer(p),
as.double(param),
2005 Mar 30
2
Step error
Could anyone tell me what am I doing wrong?
> pro<-function(indep,dep){
+ d<-data.frame(indep)
+ form<-formula(lm(dep~.,data=d))
+
forward<-step(lm(dep~X1,data=d),scope=form,trace=0,direction='f')
+ return(forward)
+ }
> pro(m,q)
Error in inherits(x, "data.frame") : Object "d" not
found
Where q is a vector with the dependent variable's
2007 Jan 01
4
Help with filled.contour()
The following plot is a first approximation to what I need:
***********************************
mu1 <- 0
mu2 <- 5
s <- 1
x <- seq(-2.5, 7.5, length = 41)
y <- seq(-2.5, 2.5, length = 41)
f <- function(x,y){
term1 <- 1/(2*pi*sqrt(s*s))
term2 <- -1/2
term3 <- (x - mu1)^2/s
term4 <- (y - mu1)^2/s
term5 <- (x - mu2)^2/s
term1*(.5 * exp(term2*(term3 + term4)) + .5 *
2009 Feb 07
3
Output results to a single postscript document
Hello R users,
I have been trying to output all my results (text, plots, etc) into the same
postscript file as
one document, but have been unable to...Can anyone help me improve my code
below so that I can
accomplish this? Currently I have to output them separately then piece them
back together into
one document..
Thanks in Advance for any help!
options (scipen=999, digits=7)
2012 Aug 07
4
help to program my function
HI
>i have a problem please help me to solve it:
http://r.789695.n4.nabble.com/file/n4639434/aj.pdf aj.pdf
>i want to calculate the vecteur a[j] where j: 1...8
>this is the code in R:
>aj.fun <- function(j, i, X, z, E, beta0, beta1){
+ n <- length(X)
+ iX <- order(X)
+ iz <- order(z)
+ e1 <- -(beta)*z[ iz[1:(i - 1)] ]
+ numer <- E[j] - sum( X[ iX[1:(i - 1)] ]
2011 Mar 29
1
Dirichlet surface
Dear list members,
I want to draw surfaces of Dirichlet distributions with different
parameter settings.
My code is the following:
#<begin code>
a1 <- a2 <- a3 <- 2
#a2 <- .5
#a3 <- .5
x1 <- x2 <- seq(0.01, .99, by=.01)
f <- function(x1, x2){
term1 <- gamma(a1+a2+a3)/(gamma(a1)*gamma(a2)*gamma(a3))
term2 <- x1^(a1-1)*x2^(a2-1)*(1-x1-x2)^(a3-1)
2005 Apr 17
1
nls segmented model with unknown joint points
Hello,
I am interested in fitting a segmented model with unknown joint points
in nls and perhaps eventually in nlme. I can fit this model in sas (see
below, joint points to be estimated are a41 and a41), but am unsure how
to specify this in the nlm function. I would really appreciate any
suggestions or example code. Thanks a lot. -andy
proc nlin data=Stems.Trees;
params b41=-3 b42=1.5
2019 Sep 18
1
[nbdkit PATCH] server: Saner filter .close calls
I found a core dump:
term1$ nbdkit -fv --filter=xz null xz-max-depth=$((0x4000000000000000))
term1...
term2$ qemu-nbd --list
term1...
nbdkit: debug: null: open readonly=1
nbdkit: error: calloc: Cannot allocate memory
nbdkit: debug: xz: close
Segmentation fault (core dumped)
(Note that the use of --run or daemonizing nbdkit makes it a bit
harder to see the core dump, but it is still happening.)
2006 May 31
1
trouble with boot ()
Dear members,
I am trying to use boot () to compute the distributions of a statistic
of a data set. The statistic is defined in the following code:
eds<-function(x) {
r<-cor(x)
paren<-1-abs(r)/2
denom<-sum(sum(paren)+0.5)
desvio<-sd(x)
media<-mean(x)
a<-desvio/media