Displaying 20 results from an estimated 106 matches for "varid".
Did you mean:
valid
2010 Oct 27
1
"non-numeric argument to binary operator" error while reading ncdf file
...ly appreciate if you could help me.
I am using R version 2.11.1 (2010-05-31) in a machine with Linux
2.6.26-2-amd64.
> library(ncdf)
> file_temp<-open.ncdf("File.nc")
> temp<-get.var.ncdf(file_temp,"tasmax",verbose=TRUE)
[1] "get.var.ncdf: entering. Here is varid:"
[1] "tasmax"
[1] "checking to see if passed varid is actually a dimvar"
[1] "entering vobjtodimname with varid= tasmax"
[1] "vobjtodimname: is a character type varid. This file has 3 dims"
[1] "vobjtodimname: no cases found, returning FALSE"...
2010 Jun 18
2
varIdent error using gam function in mgcv
Hello,
As I am relatively new to the R environment this question may be either
a) Really simple to answer
b) Or I am overlooking something relatively simple.
I am trying to add a VarIdent structure to my gam model which is fitting
smoothing functions to the time variables year and month for a particular
species. When I try to add the varIdent weights to variable Month I get this
error returned.
Error in model.frame.default(formula = Chel ~ 1 + M + YM + M + YM, weights =
Vf1, :...
2005 Nov 03
1
Fitting heteroscedastic linear models/ problems with varIdent of nlme
Hi,
I would like to fit a model for a factorial design that allows for
unequal variances in all groups. If I am not mistaken, this can be done
in lm by specifying weights.
A function intended to specify weights for unequal variance structures
is provided in the nlme library with the varIdent function. Is it
apropriate to use these weights with lm? If not, is there another
possibility to do factorial designs with heteroscedasticity?
When trying to use varIdent I get an errormessage that says that
varIndent is not a defined class. The function calls are written in the
same way as...
2007 Aug 07
0
Bug in coef<-.varIdent method (nlme package) (PR#9831)
Hello,
1. It appears that "coef<-.varIdent" method does not work properly in
some instances.
Execution error:
Error in `coef<-.varIdent`(`*tmp*`, value = c(11, 12)) :
Cannot change the length of the varIdent parameter after
initialization
occurs when "coef<-.varIdent" is applied to an initialized object...
2007 Jun 01
2
how to specify starting values in varIdent() of lme()
I was reading the help but just did not get how to specify starting values for
varIdent() of the lme() function, although I managed to do it for corSymm().
Do I specify the values just as they are printed out in an output, like c(1,
1.3473, 1.0195). Or do I need to take the residual and multiply it with these
like c(0.2235, 0.2235*1.3473, 0.2235*1.0195)
or any other form that I...
2010 Nov 05
0
NaN, ncdf
...t;/home/challar/testunix6.nc",list(var1))
genovals <- c("0.0","3",NaN,NaN,"-4","99")
put.var.ncdf(nc,"genotype",genovals,start=c(1,1),count=c(6,1),verbose=TRUE)
[1] "put.var.ncdf: entering with filename /home/challar/testunix6.nc and varid:"
[1] "genotype"
[1] "Checking to see if passed varid is ACTUALLY a dimension"
[1] "entering vobjtodimname with varid= genotype"
[1] "vobjtodimname: is a character type varid. This file has 2 dims"
[1] "vobjtodimname: no cases found, returning FALS...
2007 Jun 10
1
{nlme} Multilevel estimation heteroscedasticity
...am ~ standLRT,
data = Exam,
random = ~ 1 | school)
If I want to model only a few categories of variance, all works fine.
For instance, should I (for whatever reason) hypothesize that the
variance on the normexam-scores is larger in mixed schools than in
boys-schools, I'd use weights = varIdent(form = ~ 1 | type), leading to:
heteroscedastic <- lme(fixed = normexam ~ standLRT,
data = Exam,
weights = varIdent(form = ~ 1 | type),
random = ~ 1 | school)
This gives me nice and clear output, part of which is shown below:
Variance function:
Structure: Different standard deviations pe...
2012 Aug 28
4
[ncdf4] error converting GEIA data to netCDF
.../github.com/downloads/TomRoche/GEIA_to_netCDF/output.1.png
+ create a netCDF file using the data read from the GEIA file. (At
least, after nc_sync(netcdf.file), the file `ncdump -h`s properly.)
However, I can only *put* the data to the netCDF file:
> ncvar_put(
> + nc=netcdf.file,
> + varid=emis.var,
> + vals=t(global.emis.mx),
> + start=c(1, 1, 1),
> + count=c(-1,-1, 1)) # -1 -> all data
When I try to *pull* the data *from* the netCDF I created,
> > target.data <- ncvar_get(
> + nc=netcdf.file,
> + varid=emis.var,
> + # read all the data
> +...
2007 Sep 27
1
Getting intervals for within-group standard errors for each group using nlme and varIdent
...e standard deviations (are patients in group A less variable than those in group B? both within patient and between patient within group).
Here is the call from my lme object:
> fit3$call
lme.formula(fixed = BG ~ group, data = bg, random = list(Encounter = pdDiag(~group -
1)), weights = varIdent(form = ~1 | group))
then I call the intervals function:
Approximate 95% confidence intervals
Fixed effects:
lower est. upper
(Intercept) 123.40005 126.88445 130.36885
groupB 17.44991 23.60049 29.75107
attr(,"label")
[1] "Fixed effects:"
R...
2009 Feb 24
1
Initialize varFunc in R
...basic model was something like:
model0 <- lme( log(growth) ~ light * species.group , data=data,
random=~light|species ) # with 20 odd species divided in 2 groups
Following the methods in Pinheiro&Bates I tried to put a variance
function in the model:
model1 <- update(model0, weights=varIdent(form = ~1|species.group) )
I got no error message or note but when I printed model1 the output
did not print any variance structure. It just didn't add any weights
or variance structure and model1 = model0
If instead I ran the varFunc sepparately:
varf1 <- varIdent(form = ~1|species.gr...
2008 Jul 09
1
netCDF to TIFF
...-------------
# Set working directory and load library
setwd('C:/Users/steinber/Documents/DATA/ENSEMBLES/')
library(ncdf)
library(rgdal)
library(chron)
library(fields)
# Read netCDF file
tg.ncdf = open.ncdf('tg_0.25deg_CRU_version1.0.nc')
tg.ncdf
lonmat = get.var.ncdf(nc=tg.ncdf,varid="longitude") # reads entire matrix
latmat = get.var.ncdf(nc=tg.ncdf,varid="latitude") # ditto
timearr = get.var.ncdf(nc=tg.ncdf,varid="time") # reads entire time array
targettime = julian(x=1, d=1, y=2002, origin=c(month = 1, day = 1,
year = 1950))
inds...
2006 Sep 20
1
variance functions in glmmPQL or glm?
Hello R users-
I am new to R, and tried searching the archives and literature for an answer
to this - please be patient if I missed something obvious.
I am fitting a logistic regression model, and would like to include variance
functions (specifically the varIdent function). I cannot figure out how to
do this either in glmmPQL (or something similar) for the model with random
effects, or in glm for the model without random effects. Is it possible to
fit a varIdent function in a generalized linear model? If so, what are the
appropriate packages/functions...
2012 Jul 23
2
translating IDL to R
...tmp = gfedmly[*,j-1]
gfedmly[*,j-1] = gfedmly[*,nlat-j]
gfedmly[*,nlat-j] = tmp
endfor
undefine, tmp
; Then, you can read daily fire fractions from the netcdf file.
file1_in = string('fraction_emissions_20040121.nc')
file1_in=strcompress(file1_in, /REMOVE_ALL)
fid=NCDF_OPEN(file1_in)
varid=NCDF_VARID(fid,'Fraction_of_Emissions')
NCDF_VARGET, fid, varid, DATA
NCDF_CLOSE, fid
gfeddly=gfedmly*DATA
;++++++++++++++++++++ the end for daily emissions ++++++++++++++++++
;++++++++++++++++++++ idl code to generate 3-hourly emissions ++++++
nlon=720 ; number of grid points by longitude...
2016 Apr 22
2
Unexpected values obtained when reading in data using ncdf and ncdf4
...1:length(thesenames[,1])){
data <- nc_open(paste(INDIR, thesenames[i,c("wholename")], sep=""), write=F)
d.vars <- names(data$var)
d.size <- (data$var[[length(d.vars)]])$size
# Obtaining longitude and latitude values
d.lon <- as.vector(ncvar_get(data, varid="lon", start=c(1,1), count=c(d.size[1],d.size[2])))
d.lat <- as.vector(ncvar_get(data, varid="lat", start=c(1,1), count=c(d.size[1],d.size[2])))
# Obtaining climate data values
df.clim <- data.frame(rn=seq(1:length(d.lon)))
for(y in 1:d.size[3]){
df.clim[...
2006 Jul 17
1
Variance functions in package nlme
...ommended)
nlme package (R version 2.3.1 on a Linux platform). When trying to reproduce
an example from Jose Pinheiro & Douglas Bates (2000, p 210) I get the
following error message (code to produce message pasted as well):
library("nlme")
data("Orthodont")
vf1Ident <- varIdent( c(Female = 0.5), form = ~ 1 | Sex )
vf1Ident <- initialize(vf1Ident, Orthodont)
Error in getClass(Class) : c("\"varIdent\" is not a defined class",
"\"varFunc\" is not a defined class")
In addition: Warning message:
the condition has length > 1 and...
2011 May 21
1
predict.gls choking on levels of factor
I've got a gls formula that's a mix of continuous and ordered variables.
I wanted to use gls because I wanted to use the varIdent structure.
Anyway, attempts to use "predict.gls" choke with the error that the
levels I use are not allowed for one of them -- the first one
alphabetically, so I'd guess the second would have the same problem.
So I have three linked questions -- answering any of the three would
s...
2002 Aug 29
8
lme() with known level-one variances
Greetings,
I have a meta-analysis problem in which I have fixed effects
regression coefficients (and estimated standard errors) from identical
models fit to different data sets. I would like to use these results
to create pooled estimated regression coefficients and estimated
standard errors for these pooled coefficients. In particular, I would
like to estimate the model
\beta_{i} = \mu +
2004 Jul 12
2
lme unequal random-effects variances varIdent pdMat Pinheiro Bates nlme
...come from separate normal
distributions with possibly unequal variances.
There must be some straightforward obvious way to fit the larger model,
but I do not see it.
Pinheiro and Bates, chapter 5.2, show how to model unequal *residual*
("within-group") variances for the two groups using varIdent. They also
tantalizingly say, "The single-level variance function model (5.10) can be
generalized to multilevel models" (page 206), which seems to suggest that
a solution to the current problem might exist.
The pdMat classes provide a way to *constrain* the dispersion matrix of
the r...
2011 Sep 07
1
Error: in routine alloca() there is a stack overflow: thread 0, max 535822282KB, used 0KB, request 24B
...# ----------------
nc <- open.ncdf(gcfilename)
nc.ori <- open.ncdf(gcfilename.ori)
print ("fininshed open file")
print(nc)
print("Reading TFLAG")
# error occurs on any of the following "get.var.ncdf" calls:
tflag<- get.var.ncdf(nc,varid="TFLAG") # So this would produce the
failure
isop <- get.var.ncdf(nc,varid="ISOPRENE")
isop.ori <- get.var.ncdf(nc.ori,varid="ISOPRENE")
meoh <- get.var.ncdf(nc,varid="MEOH")
meoh.ori <- get.var.ncdf(nc.ori,varid="MEOH")...
2010 Apr 14
2
GAMM : how to use a smoother for some levels of a variable, and a linear effect for other levels?
...Birds~Rain+ID+
s(Time,by=as.numeric(ID=="Stilt.Oahu"))+
s(Time,by=as.numeric(ID=="Stilt.Maui"))+
s(Time,by=as.numeric(ID=="Coot.Oahu"))+
s(Time,by=as.numeric(ID=="Coot.Maui")),
correlation=corAR1(form=~Time |ID ),
weights=varIdent(form=~1|ID))
However, in the current version of R, this does not work anymore, and
should be changed into
BM2<-gamm(Birds~Rain+ID+
s(Time,by=ID),
correlation=corAR1(form=~Time |ID ),
weights=varIdent(form=~1|ID))
It turns out that 2 of the 4 smoothers have estimated de...