search for: giustizia

Displaying 20 results from an estimated 36 matches for "giustizia".

2009 Mar 07
3
Download and Import xls files in R
...ately 4 sheet each that I would like to download and import in R for analysis. Unfortunately i realized (i also sent an email to the author or xlsReadWrite() ) that the read.xls() doesn't allow to import the file in R from internet. Here it is the the code: ciao<-read.xls("http://www.giustizia.it/statistiche/statistiche_dap/det/seriestoriche/corsi_proff.xls") This doesn't work.. How would you solve the problem in an automated way? I would not like to manually download each one, open it with excel and saving in in csv? Thanks, Francesco
2006 May 26
1
how to pick a value from AR equation
...trix (in a for cycle) with all the values of coefficients, standard deviations, PP statistics and the relevant critical value for the series i have. thanks in advance L -- **************************************************************** credo nella ragione umana, e nella liberta' e nella giustizia che dalla ragione scaturiscono. (sciascia)
2003 Apr 17
4
A function as argument of another function
Dear all, I would like to write a function like: myfun<-function(x,fn) {xx<-exp(x); x*fn(xx)} where fn is a symbolic description of any function with its argument to be specified. Therefore myfun(5,"2+0.3*y^2") should return 5*(2+0.3*exp(5)^2), myfun(5,"log(y)") should return 5*log(exp(5)) and so on. I tried with "expression" and others, but without success.
2003 Feb 17
0
Re: R-help digest, Vol 1 #80 - 14 msgs
> Subject: [R] LRT in arima models > Date: Mon, 17 Feb 2003 11:53:04 +0100 > From: "vito muggeo" <vito.muggeo at giustizia.it> > To: <r-help at stat.math.ethz.ch> > > Dear all, > > For some reason I'm evaluating the size of the LRT testing for the effect of > some explanatory variable in arima models. > I performed three different simulations > y<-2+arima.sim(n, model=list(ar=ar....
2006 May 29
0
troubles with kzft
...-coeff.kzft(100,1) frq<-seq(0, 2*pi, by=0.05) tf1<-transfun.kzft(100,1,frq,0.0025) X<-kzft(Gamma[(1:196),(1:196),], 100, 1, 1, 0.005) thanks in advance. Lorenzo -- **************************************************************** credo nella ragione umana, e nella liberta' e nella giustizia che dalla ragione scaturiscono. (sciascia) **************************************************************** [[alternative HTML version deleted]]
2011 Jun 05
1
Negating two identical characters with regular expressions
Hello all, Let's say I have a character string "Race-ethnicity-----coding information" I want to extract all text before the multiple dashes, including the word "ethnicity." I wrote a handy function to extract the first matched text: grepcut <- function(pattern,x){ start.and.length <- regexpr(pattern,x) substring(x,start.and.length,start.and.length
2001 Dec 03
1
fitting models with the subset argument
Hi all, I'd like to fit model where the terms both are in the data.frame, mydata say, and are vectors *not in the data.frame*. >obj<-glm(y~x, data=mydata) #works >Z<-pmax(mydata$x-20,0) >(length(Z)==length(obj$y)) >[1] TRUE >update(obj,.~.+Z) #works However for some subset it doesn't works: >obj<-glm(y~x, data=mydata, subset=f==1) #works
2004 Oct 26
2
vcov method for 'coxph' objects
Dear all, The help file for the generic function vcov states "Classes with methods for this function include: 'lm', 'glm', 'nls', 'lme', 'gls', 'coxph' and 'survreg' (the last two in package 'survival')." Since, I am not able to use vcov.coxph(), I am wondering whether I am missing something (as I suspect..) regards, vito
2003 Dec 16
3
`bivariate apply'
dear all, Given a matrix A, say, I would like to apply a bivariate function to each combination of its colums. That is if myfun<-function(x,y)cor(x,y) #computes simple correlation of two vectors x and y then the results should be something similar to cor(A). I tried with mapply, outer,...but without success Can anybody help me? many thanks in advance, vito
2003 Mar 12
1
simulating 'non-standard' survival data
Dear all, I'm looking for someone that help me to write an R function to simulate survival data under complex situations, namely time-varying hazard ratio, marginal distribution of survival times and covariates. The algorithm is described in the reference below and it should be not very difficult to implement it. However I tried but without success....;-( Below there the code that I used; it
2002 Sep 18
3
problem in deparse(substitute())
Hi all, I am experiencing the following quite strange (at least in my knowledge) problem in a simple function like the following: fn<-function(y,v=2){ n<-length(y) y<-y[(v+1):(n-v)] plot(y,type="l",lty=3,xlab="Time",ylab=deparse(substitute(y))) } fn(rnorm(50)) #look at the plot!!! The plot appears with numbers on the left side! If I delete the
2004 Nov 02
3
time dependency of Cox regression
Hi, How can I specify a Cox proportional hazards model with a covariate which i believe its strength on survival changes/diminishes with time? The value of the covariate was only recorded once at the beginning of the study for each individual (e.g. at the diagnosis of the disease), so I do not have the time course data of the covariate for any given individual. For example, I want to state at the
2002 Aug 30
4
Intercept in model formulae.
Hi, I'm trying to create a linear model for a dataset that has a breakpoint e.g. # dummy dataset x <- 1:20 y <- c(1:10,seq(10.5,15,0.5)) plot(x,y) I've modelled this using the following formula: temp <- lm(y ~ x*(x<=10)+x*(x>10)) I want to be able to omit the intercept (i.e. force the line through zero) from the first of these segments (x<=10) so that I'm only
2003 Oct 09
0
new package: segmented
A few days ago I uploaded to CRAN a new package called segmented. The package contains functions to fit (generalized) linear models with `segmented' (or `broken-line' or `piecewise linear') relationships between the response and one or more explanatory variables according to methodology described in Muggeo VMR (2003), Estimating regression models with unknown break-points, Statistics
2001 Dec 19
1
Pearson residuals in quasi family
Hi all, This is a very silly question or something escapes me: Let obj a simple gam poisson model. Let >obj<-gam(....,family=poisson) >obj1<-update(obj, family=quasi(link="log", var="mu")) >From summary.glm(obj1) the dispersion parameter is estimated 1.165; In fact it is: > (predict(obj1, se.fit=T)$se.fit[1:5]/predict(obj, se.fit=T)$se.fit[1:5])^2 4
2002 Mar 07
0
Hierarchical Terms in RE models?
Hi all, this is a question (really, not necessarly related to R) that I was not able to find in standard textbooks (at last those I've read, of course: Bates and Pinero, Lindsey). I'm fitting a linear mixed model with fixed part: X+A+X:A Just the interaction term X:A is significant suggesting an effect of X only in one group (suppose X is continuous and A is a binary variable, although
2002 Jul 30
0
question on the ellipse package
Hi all, I'm intersted in draw confidence regions for two estimates that *are not* in the same GLM, but I know their point estimates c(a,b) and their covariance matrix V, say. Of course > V[1,2]==V[2,1] [1] TRUE Their joint distribution is not binormal (at least i don't know it), but I know (or I assume) their limiting distribution is Normal, so I can use the bivariate Wald statistics to
2002 Sep 26
0
glm.fit() and binomial family
Hi all, I'm interested in updating glm using glm.fit() (of course my final output is different, but the problem is in glm.fit()). Then my function is, say: fn<-function(obj,z){ X<-update(obj,x=T)$x X<-cbind(X,z) y<-obj$y fam<-family(obj) o<-obj$offset contr<-obj$control w<-obj$weights
2002 Nov 08
1
extracting response from arima obj
dear all, Is it possible to extract the response vector from a fitted arima object? For instance in glm it is allowed, by: obj.glm<-glm(y~x) obj.glm$y #the response vector In arima I can't find it: obj.arima<-arima(y, order=c(1,0,1)) #say names(obj.arima) doesn't seem to include the response. Am I wrong? Many thanks for your help, best, vito
2003 Mar 11
2
about the "mini-distribution" (R for Win )
Dear all, I've just downloaded the miniR.exe, miniR-1.bin,....,miniR-8.bin in order to update R to 1.6.2 (I cannot download the file of 19Mb !). The installation seems to have worked fine, but I can't find in the /bin dir several files that were, for instance, in the /bin directory in the version 1.5.1 In particular the file Rcmd.exe is missing, therefore I cannot run R in BATCH mode (I