2aravopoollori8qut9Index11 aravoAlpineplantcommunitiesinAravoFranceAbundancedataandcovariates DescriptionOr ID: 846267
Download Pdf The PPT/PDF document "PackageloriDecember162020TypePackageTitl..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
1 Package`lori'December16,2020TypePackageT
Package`lori'December16,2020TypePackageTitleImputationofHigh-DimensionalCountDatausingSideInformationVersion2.2.2MaintainerGenevieveRobingene;viev;.ro;in@;nrs;.fr0;DescriptionAnalysis,imputation,andmultipleimputationofcountdatausingcovariates.LORIusesalog-linearPoissonmodelwheremainrowandcolumneffects,aswellaseffectsofknowncovari-atesandinteractiontermscanbetted.Theestimationprocedureisbasedontheconvexopti-mizationofthePoissonlosspenalizedbyaLassotypepenaltyandanuclearnorm.LORIre-turnsestimatesofmaineffects,covariateeffectsandinteractions,aswellasanimputedcountta-ble.Thepackagealsocontainsamultipleimputationprocedure.Themethodsarede-scribedinRobin,Josse,MoulinesandSardy(2019) rXi;─v:1703.02296v4.LicenseGPL-3EncodingUTF-8LazyDatatrueDependsstats,data.table,rARPACK,svd,R rXi;─(=2.10)Suggestsknitr,rmarkdown,testthatVignetteBuilderknitrRoxygenNote7.1.1NeedsCompilationnoAuthorGenevieveRobin[aut,cre]RepositoryCRANDate/Publication2020-12-1614:00:06UTCRtopicsdocumented:aravo.............................................2covmat.........................
2 ...................3cv.lori.............
...................3cv.lori............................................3lori..............................................5mi.lori............................................71 2aravopool.lori...........................................8qut..............................................9Index11 aravoAlpineplantcommunitiesinAravo,France:Abundancedataandco-variates DescriptionOriginallypublishedinCholer,P.2005.ConsistentshiftsinAlpineplanttraitsalongamesotopo-graphicalgradient.Arctic,Antarctic,andAlpineResearch37:444453.Usagedata(aravo)FormatAlistwith4attributes:speabundancetableof82speciesin75environmentsenvamatrixof6covariatesforthe75environmentstraitsamatrixof8covariatesforthe82speciesspe.namesavectorof82speciesnamesDetailsAnalysedinDray,S.,Choler,P.,Dolédec,S.,Peres-Neto,P.R.,Thuiler,W.,Pavoine,S.&terBraak,C.J.F.2014.Combiningthefourth-cornerandtheRLQmethodsforassessingtraitresponsestoenvironmentalvariation.Ecology95:14-21DescriptionfromDrayetal.(2014):Communitycompositionofvascularplantswasdeterminedin755×5mplots.Eachsitewasdescribedbysixenvironmentalvariables:meansno
3 wmeltdateovertheperiod19971999,slo
wmeltdateovertheperiod19971999,slopeinclination,aspect,indexofmicroscalelandform,indexofphysicaldisturbanceduetocryoturbationandsoliuction,andanindexofzoogenicdisturbanceduetotramplingandburrowingactivitiesoftheAlpinemarmot.Allvariablesarequantitativeexceptthelandformandzoogenicdisturbanceindicesthatarecategoricalvariableswithveandthreecategories,respectively.Eightquantitativefunctionaltraits(i.e.,vegetativeheight,lateralspread,leafelevationangle,leafarea,leafthickness,specicleafarea,mass-basedleafnitrogencontent,andseedmass)weremeasuredonthe82mostabundantplantspecies(outofatotalof132recordedspecies).Sourcehttp://pbil.univ-lyon1.fr/ade4/ade4-html/aravo.html covmat3 covmatcovmat DescriptioncovmatUsagecovmat(n,p,R=NULL,C=NULL,E=NULL,center=F)ArgumentsnnumberofrowspnumberofcolumnsRnxK1matrixofrowcovariatesCnxK2matrixofcolumncovariatesE(n+p)xK3matrixofrow-columncovariatescenterbooleanindicatingwhetherthereturnedcovariatematrixshouldbecentered(foridentiability)ValuethejointproductofRandCcolumn-bindedwithE,a(np)x(K1+K2+K3)matrixinorderrow1col1,row2col1,...,rown
4 col1,row1col2,row2col2,...,rowncolpExamp
col1,row1col2,row2col2,...,rowncolpExamplesRmatrix(rnorm(10),5)Cmatrix(rnorm(9),3)covscovmat(5,3,R,C) cv.loriThecv.lorimethodperformsautomaticselectionoftheregularizationparameters(lambda1andlambda2)usedinthelorifunction.Theseparametersareselectedbycross-validation.Theclassicalprocedureistoapplycv.loritothedatatoselecttheregularizationparameters,andtothenimputeandanalyzethedatausingthelorifunction(ormi.loriformultipleimputation). DescriptionThecv.lorimethodperformsautomaticselectionoftheregularizationparameters(lambda1andlambda2)usedinthelorifunction.Theseparametersareselectedbycross-validation.Theclassicalprocedureistoapplycv.loritothedatatoselecttheregularizationparameters,andtothenimputeandanalyzethedatausingthelorifunction(ormi.loriformultipleimputation). 4cv.loriUsagecv.lori(Y,cov=NULL,intercept=T,reff=T,ceff=T,rank.max=5,N=5,len=20,prob=0.2,algo=c("alt","mcgd"),thresh=1e-05,maxit=10,trace.it=F,parallel=F)ArgumentsY[matrix,data.frame]abundancetable(nxp)cov[matrix,data.frame]designmatris(npxq)intercept[boolean]whetheraninterceptshouldbetted,defaultvalueisFALSEreff[bool
5 ean]whetherroweffectsshouldbetted,de
ean]whetherroweffectsshouldbetted,defaultvalueisTRUEceff[boolean]whethercolumneffectsshouldbetted,defaultvalueisTRUErank.max[integer]maximumrankofinteractionmatrix,defaultis2N[integer]numberofcross-validationfoldslen[integer]thesizeofthegridprob[numericin(0,1)]theproportionofentriestoremoveforcross-validationalgotypeofalgorithmtouse,eitheroneof"mcgd"(mixedcoordinategradientde-scent,adaptedtolargedimensions)or"alt"(alternatingminimization,adaptedtosmalldimensions)thresh[positivenumber]convergencethreshold,defaultis1e-5maxit[integer]maximumnumberofiterations,defaultis100trace.it[boolean]whetherinformationaboutconvergenceshouldbeprintedparallel[boolean]whethercomputationsshouldbeperformedinparallelonmultiplecoresValueAlistwiththefollowingelementslambda1regularizationparameterestimatedbycross-validationfornuclearnormpenalty(interactionmatrix) lori5lambda2regularizationparameterestimatedbycross-validationforl1normpenalty(maineffects)errorsatablecontainingthepredictionerrorsforallpairsofparametersExamplesXmatrix(rnorm(20),10)Ymatrix(rpois(10,1:10),5)rescv.lori(Y,X,N=2,len=2)
6 loriThelorimethodimplementsamethodtoana
loriThelorimethodimplementsamethodtoanalyzeandimputeincom-pletecounttables.Animportantfeatureofthemethodisthatitcantakeintoaccountmaineffectsofrowsandcolumns,aswellaseffectsofcontinuousorcategoricalcovariates,andinteraction.Theestima-tionprocedureisbasedonminimizingaPoissonlosspenalizedbyaLassotypepenalty(sparsevectorofcovariateeffects)andanuclearnormpenaltyinducingalow-rankinteractionmatrix(afewlatentfac-torssummarizetheinteractions). DescriptionThelorimethodimplementsamethodtoanalyzeandimputeincompletecounttables.Animportantfeatureofthemethodisthatitcantakeintoaccountmaineffectsofrowsandcolumns,aswellaseffectsofcontinuousorcategoricalcovariates,andinteraction.TheestimationprocedureisbasedonminimizingaPoissonlosspenalizedbyaLassotypepenalty(sparsevectorofcovariateeffects)andanuclearnormpenaltyinducingalow-rankinteractionmatrix(afewlatentfactorssummarizetheinteractions).Usagelori(Y,cov=NULL,lambda1=NULL,lambda2=NULL,intercept=T,reff=T,ceff=T,rank.max=2,algo=c("alt","mcgd"),thresh=1e-05,maxit=100,trace.it=F,parallel=F) 6loriArgumentsY[matrix,data.frame]counttable(nxp).cov[matr
7 ix,data.frame]designmatrix(np*q)inorderr
ix,data.frame]designmatrix(np*q)inorderrow1xcol1,row2xcol2,..,rownxcol1,row1xcol2,row2xcol2,...,...,rownxcolplambda1[positivenumber]theregularizationparameterfortheinteractionmatrix.lambda2[positivenumber]theregularizationparameterforthecovariateeffects.intercept[boolean]whetheraninterceptshouldbetted,defaultvalueisFALSEreff[boolean]whetherroweffectsshouldbetted,defaultvalueisTRUEceff[boolean]whethercolumneffectsshouldbetted,defaultvalueisTRUErank.max[integer]maximumrankofinteractionmatrix(smallerthanmin(n-1,p-1))algotypeofalgorithmtouse,eitheroneof"mcgd"(mixedcoordinategradientde-scent,adaptedtolargedimensions)or"alt"(alternatingminimization,adaptedtosmalldimensions)thresh[positivenumber]convergencetoleranceofalgorithm,bydefault1e-6.maxit[integer]maximumallowednumberofiterations.trace.it[boolean]whetherconvergenceinformationshouldbeprintedparallel[boolean]whethercomputationsshouldbeperformedinparallelonmultiplecoresValueAlistwiththefollowingelementsXnxpmatrixoflogofexpectedcountsalpharoweffectsbetacolumneffectsepsiloncovariateeffectsthetanxpmatrixofrow-columninter
8 actionsimputednxpmatrixofimputedcountsme
actionsimputednxpmatrixofimputedcountsmeansnxpmatrixofexpectedcounts(exp(X))covnpxKmatrixofcovariatesExamples mi.lori7 mi.loriThemi.loriperformsMmultipleimputationsusingthelorimethod.Multipleimputationallowstoproduceestimatesofmissingvalues,aswellasintervalsofvariability.TheclassicalprocedureistoperformMmultipleimputationsusingthemi.lorimethod,andtoaggregatethemusingthepool.lorimethod. DescriptionThemi.loriperformsMmultipleimputationsusingthelorimethod.Multipleimputationallowstoproduceestimatesofmissingvalues,aswellasintervalsofvariability.TheclassicalprocedureistoperformMmultipleimputationsusingthemi.lorimethod,andtoaggregatethemusingthepool.lorimethod.Usagemi.lori(Y,cov=NULL,lambda1=NULL,lambda2=NULL,M=25,intercept=T,reff=T,ceff=T,rank.max=5,algo=c("alt","mcgd"),thresh=1e-05,maxit=1000,trace.it=F)ArgumentsY[matrix,data.frame]counttable(nxp).cov[matrix,data.frame]designmatrix(np*q)inorderrow1xcol1,row2xcol2,..,rownxcol1,row1xcol2,row2xcol2,...,...,rownxcolplambda1[positivenumber]theregularizationparameterfortheinteractionmatrix.lambda2[positivenumber]theregularizationparamete
9 rforthecovariateeffects.M[integer]thenum
rforthecovariateeffects.M[integer]thenumberofmultipleimputationstoperformintercept[boolean]whetheraninterceptshouldbetted,defaultvalueisFALSEreff[boolean]whetherroweffectsshouldbetted,defaultvalueisTRUEceff[boolean]whethercolumneffectsshouldbetted,defaultvalueisTRUErank.max[integer]maximumrankofinteractionmatrix(smallerthanmin(n-1,p-1)) 8pool.lorialgotypeofalgorithmtouse,eitheroneof"mcgd"(mixedcoordinategradientde-scent,adaptedtolargedimensions)or"alt"(alternatingminimization,adaptedtosmalldimensions)thresh[positivenumber]convergencetoleranceofalgorithm,bydefault1e-6.maxit[integer]maximumallowednumberofiterations.trace.it[boolean]whetherconvergenceinformationshouldbeprintedValuemi.imputedalistoflengthMcontainingtheimputedcounttablesmi.alphaa(Mxn)matrixcontaininginrowstheestimatedroweffects(onerowcorre-spondstoonesingleimputation)mi.betaa(Mxp)matrixcontaininginrowstheestimatedcolumneffects(onerowcorre-spondstoonesingleimputation)mi.epsilona(Mxq)matrixcontaininginrowstheestimatedeffectsofcovariates(onerowcorrespondstoonesingleimputation)mi.thetaalistoflengthMcontaini
10 ngtheestimatedinteractionmatricesmi.mual
ngtheestimatedinteractionmatricesmi.mualistoflengthMcontainingtheestimatedPoissonmeansmi.ylistofbootstrappedcounttablesusedfotmultipleimputationYoriginalincompletecounttableExamplesXmatrix(rnorm(50),25)Ymatrix(rpois(25,1:25),5)resmi.lori(Y,X,10,10,2) pool.loriThepool.lorimethodaggregateslorimultipleimputationresults.Mul-tipleimputationallowstoproduceestimatesofmissingvalues,aswellasintervalsofvariability.Theclassicalprocedureistoperformmulti-pleimputationusingthemi.lorimethod,andtoaggregatethemusingthepool.lorimethod. DescriptionThepool.lorimethodaggregateslorimultipleimputationresults.Multipleimputationallowstoproduceestimatesofmissingvalues,aswellasintervalsofvariability.Theclassicalprocedureistoperformmultipleimputationusingthemi.lorimethod,andtoaggregatethemusingthepool.lorimethod.Usagepool.lori(res.mi) qut9Argumentsres.miamultipleimputationresultfromthefunctionmi.loriValuepool.imputealistcontainingthepooledmeans(mean)andvariance(var)oftheimputedvaluespool.alphaalistcontainingthepooledmeans(mean)andvariance(var)oftheroweffectspool.betaalistcontainingthepooledmeans(mean)and
11 variance(var)ofthecolumneffectspool.epsi
variance(var)ofthecolumneffectspool.epsilonalistcontainingthepooledmeans(mean)andvariance(var)ofthecovariateeffectspool.thetaalistcontainingthepooledmeans(mean)andvariance(var)oftheinteractionsExamplesXmatrix(rnorm(50),25)Ymatrix(rpois(25,1:25),5)resmi.lori(Y,X,10,10,2)poolrespool.lori(res) qutautomaticselectionofnuclearnormregularizationparameter DescriptionautomaticselectionofnuclearnormregularizationparameterUsagequt(Y,cov,lambda2=0,q=0.95,N=100,reff=T,ceff=T)ArgumentsYAmatrixofcounts(contingencytable).covA(np)xKmatrixofKcovariatesaboutrowsandcolumnslambda2Apositivenumber,theregularizationparameterforcovariatesmaineffectsqAnumberbetween0and1.Thequantileofthedistributionof$lambda_QUT$totake.NAninteger.Thenumberofparametricbootstrapsamplestodraw.reff[boolean]whetherroweffectsshouldbetted,defaultvalueisTRUEceff[boolean]whethercolumneffectsshouldbetted,defaultvalueisTRUE 10qutValuethevalueof$lambda_QUT$touseinLoRI.ExamplesX=matrix(rnorm(30),15)Y=matrix(rpois(15,1:15),5)lambda=qut(Y,X,10,N=10) Indexdatasetsaravo,2aravo,2covmat,3cv.lori,3lori,5mi.lori,7pool.lori,8qut,